0

Ive been trying desperately all day to get an email sent from a php file running on xampp from a gmail account.

I want to use Gmails SMTP as I tried forever to get Mercury to work and it was very problematic. So far I set it up as described below:

[sendmail]
smtp_server=smtp.gmail.com
smtp_port=25
smtp_ssl=auto
auth_username=justinharr6@gmail.com
auth_password=*password*
force_sender=justinharr@gmail.com

[mail function]
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
mail.add_x_header = Off
(everything else commented out)

Keep in mind this is one of many configurations I have tried none of which work. My php files is returning true from the Mail call but its never getting to the destination. Any help would be greatly appreciated.

AnFi
  • 10,493
  • 3
  • 23
  • 47
DasBeasto
  • 2,082
  • 5
  • 25
  • 65
  • I don't think `smtp.gmail.com` SMTP runs on port `25`. you may need to try `smtp_server=aspmx.l.google.com` if you need to use port 25, again this server is not reliable. You can use `port 465` (SSL) and `587` StartTLS on `smtp.gmail.com` – bansi Nov 22 '13 at 06:19
  • Ive tried doing both of those as well, along a lot of other combinations of paths and port that have been recommended across the web and nothing seems to be working. Is my ISP perhaps just blocking all of the outgoing mail? – DasBeasto Nov 22 '13 at 06:36
  • 1
    Can you use [PHPMailer](https://code.google.com/a/apache-extras.org/p/phpmailer/) instead of PHP mail function? – bansi Nov 22 '13 at 11:41
  • Ive tried PHPMailer about 6 times with no success. But you reccomended it and I tried it again and it worked! So thank you so much! – DasBeasto Nov 22 '13 at 16:39

1 Answers1

1

i am assuming you are trying to send a mail through local host

i suggest you should use PHP mailer class

ahmad05
  • 438
  • 2
  • 6
  • 23