• 周年纪念勋章活动已圆满结束,如有已购买但仍未申请的用户,可以通过对应勋章的下载链接申请~

Multicraft 如何使用smtp进行对外发送邮件(适用于所有主机)

frankniubi

McBar Pro

管理成员
版主
注册
2018/02/09
消息
28
金粒
2,724金粒
这里是frankniubi。今天没事干给大家写个如何用smtp来对外发送邮件。
这里就用multicraft来做演示,
1.如果你是linux主机请进入(目录没有改变的话)/var/www/html/multicraft/protected/config/internal/application.php(靠背的,如果我记错了自己找找正确的路径或者给我留言。)
2.往下滑,找到smtp什么的,这里记得把*/ /*注释去掉来启用smtp
官方是这么说的:

Send mails using SMTP instead of PHP mail()
If you want to send emails directly through an SMTP server instead of using the PHP mail() function you can edit the file protected/config/internal/application.php and look for the line:'transportType'=>'smtp'
Remove the "/*" and "*/" around this block of code and configure the values accordingly to use your SMTP server.

然后server这里填写你自己的smtp服务器。
如果说你没有的话,请自行去mail.google.com 注册一个账户
然后地址填写 smtp.gmail.com port(端口)填写465(默认即可) 用户名密码就是你的谷歌账户名字
这里我就不放出来我们自己的了。
填好保存上传到服务器
请注意:不要忘记修改再设置中的管理员邮件地址。不然可能会出现问题。


好消息:现在 blog.mcbar.cc 上点击打赏,满10元就送mc服务器一个月,满25就送一个月vps!
多打赏多得!
 
  • 喜欢
反馈: YYT

在线会员

  • fanting
  • 茶茶space
  • ENDxDDA
  • 狐风轩汐
  • Nickelodeon
  • wuyewoi
  • qqt8023
  • SASOURI
  • 一远征2
  • 御坂御坂
  • xliang
  • AkkTNT
  • 红葵
  • Carrido
  • 一二九
  • Super_Ling
  • soft
  • 嚣兮
  • 1905373790
  • hhhhGG
  • PuddingKC
...和 42 更多。
后退
顶部 底部