$config->mail->turnon = true; // trun on email feature or not.
$config->mail->fromAddress = 'annjiang@cop.com'; // The from address.
$config->mail->fromName = 'annjiang'; // The from name.
$config->mail->mta = 'smtp'; // phpmail|sendmail|smtp|gmail
/* SMTP settings. */
if($config->mail->mta == 'smtp')
{
$config->mail->smtp->debug = 2; // Debug level, 0,1,2.
$config->mail->smtp->auth = true; // Need auth or not.
$config->mail->smtp->host = 'smtp.cop.com'; // The smtp server host address.
$config->mail->smtp->port = '587'; // The smtp server host port.
$config->mail->smtp->secure = 'tls'; // The type to encode datas, 'ssl' or 'tls' allowed
$config->mail->smtp->username = 'annjiang@cop.com'; // The smtp user, may be a full email adress.
$config->mail->smtp->password = '123456ANNJIANG'; // The smtp user's password.
}
/* Gmail setting. */
elseif($config->mail->mta == 'gmail')
{
$config->mail->gmail->debug = 0; // Debug level, 0,1,2.
$config->mail->gmail->username = ""; // GMAIL username
$config->mail->gmail->password = ""; // GMAIL password
}
配置文件如上,客户端如果想接收发送邮件需要安装认证证书,这种加密形式如何配置那?
折腾了很多天,都没好用。
显示的log
SMTP -> FROM SERVER:220 smtp.
cop.com Microsoft ESMTP MAIL Service ready at Thu, 5 Apr 2012 17:24:10 +0800
SMTP -> FROM SERVER: 250-smtp.
cop.com Hello [nn.n.nn.nnn] 250-SIZE 10485760 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH GSSAPI NTLM 250-8BITMIME 250-BINARYMIME 250 CHUNKING
SMTP -> FROM SERVER:220 2.0.0 SMTP server ready
获取技术支持
王春生
2012/04/05
这个看是正常的,发信应该没有问题的。
回复
|