Already registered? Log in
The stock mail() that comes with PHP does not usually allow you to use an SMTP server of your choice, and it does not support SMTP authentication. The free PEAR Mail package fixes the above problems.
Firstly, make sure PEAR is installed. If you are unsure if Pear is installed, type pear and press Enter at the command prompt. You’ll see a list of pear commands if it is already installed.
Typically, in particular with PHP 4 or later, PEAR is already installed for you. If it is not installed, You can download and install as per the instructions provided here.
Install PEAR Mail package and its dependencies as given below:
" . $mail->getMessage() . "
");Message successfully sent!
");PHP Script to Send Email Using SMTP Authentication and SSL Encryption:
" . $mail->getMessage() . "
");Message successfully sent!
");Please note: If you experience “timeouts” or problems connecting due to an unreliable internet connection, consider increasing the max_execution_time setting in the php.ini file on your server, to a value such as 120 (instead of the default value 30).
Try SMTP2GO free for as long as you like:
Try SMTP2GO Free → Paid plans available for over 1,000 emails/month.