: Force all PHP Mail() to go through SMTP Is there anyway to force everytime the PHP Mail() is used to force it to use SMTP authentication? Maybe a setting through the PHP.ini file or a server
Is there anyway to force everytime the PHP Mail() is used to force it to use SMTP authentication?
Maybe a setting through the PHP.ini file or a server configuration?
More posts by @Murphy175
4 Comments
Sorted by latest first Latest Oldest Best
Another solution is to override your mail() to use your own function that use an external library like PHPmailer. It is possible with the APD extension.
On Windows you can force to use SMTP by changing php.ini (but I don't know if you can do authentication):
ini_set ( "SMTP", "smtp-server.example.com" );
On Linux, you need to configure the system-wide local mail agent.
Check this page, maybe it can be useful :
Send Email from a PHP Script Using SMTP Authentication
You can use phpmailer project to work with email through your codes. This project uses SMTP for its activity.
For more information, take a look at phpmailer.worxware.com/
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.