0
votes

I'm trying to send emails from my php localhost.

I edited the following files according to a working tutorial (https://www.youtube.com/watch?v=TO7MfDcM-Ho)

php.ini and sendmail.ini

Used gmail smtp server in sendmail.ini

smtp_server=smtp.gmail.com

smtp_port=587

auth_username=myemail auth_password=mypass

When I tried to send the mail, there isn't any error but the mail isn't receiving.

Can anybody tell me where did I go wrong? Should I change anything in the gmail account which I used for the authentication in sendmail.ini ?

1
Try to get the error message, or maybe the mail is in the spam folder? - Gerben Jacobs
@GerbenJacobs: I checked the spam folder, but it's not there. I will try to get the error message. - user1012181
@AMS: I don't think this is the right solution for this localhost. - user1012181
@GerbenJacobs, sorry but how can I get an error message for this function? - user1012181

1 Answers

0
votes

I dont think that you can use gmail as your local smtp server. The link was given as a trivial information. If you want to use the mail() function of PHP via Gmail maybe you should look at the one I gave you or use your FAI smtp or install a smtp server on your machine. I may be wrong but using some smtp servers sometimes requires you to first connect via pop or imap and then you can use the smtp.