Sending HTML message through PEAR while using SMTP authentication returns an error

前端 未结 4 1825
面向向阳花
面向向阳花 2021-01-13 03:38

I\'m trying to send an HTML message while using SMTP authentication to Gmail in PHP. Here is the script that I am using:

require_once \"Mail.php\";
require_o         


        
4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-13 04:02

    See the below URL I think it is very help full to you.

    How to send an HTML email using SMTP in PHP

    The Gmail's SMTP server address is SMTP.GOOGLEMAIL.COM not SMTP.GMAIL.COM.

    Therefore Your settings should be:

    // ...
    $smtp=array();
    $smtp['host']='ssl://smtp.googlemail.com';
    

    See another example:-

    Send An HTML & Plain Text Email Using An SMTP Server With PHP & PEAR

    http://tonyvirelli.com/slider/php-html-email-using-smtp/

提交回复
热议问题