Jump to content

php mail() issue


danielhieb

Recommended Posts

I am learning php and am attempting to use a remote smtp server to test the mail() command in a php after submitting an html form. I am using an apache server on a windows 7 machine.

 

Is there any way to alter the php.ini to use an external smtp server, such as smtp.gmail.com ? I cant seem to get it working.

17243_.php

Link to comment
https://forums.phpfreaks.com/topic/254254-php-mail-issue/
Share on other sites

While the mail function does support remote smtp servers, it does not support passing authentication. Hence, you cannot use smtp servers which require authentication. Gmail is one such smtp server.

 

For testing purposes your better of installing a sendmail implementation such as ssmtp (assuming your using Linux).

 

Otherwise, you can use third party libs like simpleMail instead of the mail function.

Link to comment
https://forums.phpfreaks.com/topic/254254-php-mail-issue/#findComment-1303606
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.