danielhieb Posted January 3, 2012 Share Posted January 3, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/254254-php-mail-issue/ Share on other sites More sharing options...
trq Posted January 3, 2012 Share Posted January 3, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/254254-php-mail-issue/#findComment-1303606 Share on other sites More sharing options...
danielhieb Posted January 3, 2012 Author Share Posted January 3, 2012 Dang. I thought that might be the case. I saw some smtp information i could add to the php.ini at another site online, but it didn't list auth abilities so your feedback affirms this. Thanks for the prompt response, thorpe. Quote Link to comment https://forums.phpfreaks.com/topic/254254-php-mail-issue/#findComment-1303607 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.