Joomla教程:本地搭建的Joomla站点发送邮件


多数ISP会屏蔽端口25,所以你不能以自己的电脑作为SMTP服务器来发送电子邮件。这样做的目的是屏蔽垃圾邮件发送者。但是如果你并非意图去发送垃圾邮件,你可以使用你的ISP的邮件服务器。

即使你是基于自己的电脑在本地搭建的Joomla,你也可以通过ISP的SMTP服务器来获得发送电子邮件的功能。通过Joomla管理员帐号登录管理后台,进入“全局设置(Global Configuration)”中的“邮件(mail)”选项卡。现在的设置应该是这样的:

Mailer: SMTP Server
MailFrom: someone@example.com
From Name: SomeName
Sendmail Path /usr/sbin/sendmail
SMTP Auth: Yes
SMTP User: johndoe (username at one of your email accounts at your ISP)
SMTP Pass: trr33459 (password at one of your email accounts at your ISP)
SMTP Host: smtp.charter.net (Whatever your ISP tells you to use for their SMTP servers)

其中SMTP的用户名(User),密码(Pass)以及Host均与你的Outlook等邮件客户端采用相同的帐户设置。

在使用那些会修改“发送者”地址的email组件进行邮件发送的时候也许会产生错误。例如,“ProjectFork”组件有时会以项目管理者的身 份作为 “发送者”来发送邮件,这样做会导致错误,因为一些ISP的SMTP服务器不允许以认证用户之外的地址作为“发送者”。你会收到类似这样的错误信 息:“PHPMAILER_FROM_FAILED name@whatever.com This e-mail address is being protected from spambots. You need JavaScript enabled to view it ”.所以你必须使用已通过ISP认证的邮箱地址来发送邮件。


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3