Mobile app version of vmapp.org
Login or Join
Murphy175

: 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

@Murphy175

Posted in: #Email #Php

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?

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy175

4 Comments

Sorted by latest first Latest Oldest Best

 

@Sent6035632

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.

10% popularity Vote Up Vote Down


 

@Pierce454

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.

10% popularity Vote Up Vote Down


 

@Shakeerah822

Check this page, maybe it can be useful :

Send Email from a PHP Script Using SMTP Authentication

10% popularity Vote Up Vote Down


 

@Welton855

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/

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme