我正在制作一个流星应用程序,我添加了mrt accounts-password包以及mrt accounts-ui-bootstrap-dropdown .
我添加了登录按钮,以便用户可以创建一个帐户,并且工作得很好 . 我正在使用所有默认值 .
在服务器上我有代码:
Accounts.config({
sendVerificationEmail: true,
forbidClientAccountCreation: false
});
当我创建一个新帐户时,服务器控制台会打印:
I20130821-18:31:42.105(-4)? ====== BEGIN MAIL #0 ======
I20130821-18:31:42.106(-4)? MIME-Version: 1.0
I20130821-18:31:42.107(-4)? From: "Meteor Accounts" <no-reply@meteor.com>
I20130821-18:31:42.108(-4)? To: hidden@hidden.edu
I20130821-18:31:42.108(-4)? Subject: How to verify email address on localhost:3000
I20130821-18:31:42.109(-4)? Content-Type: text/plain; charset=utf-8
I20130821-18:31:42.109(-4)? Content-Transfer-Encoding: quoted-printable
I20130821-18:31:42.109(-4)? Hello,
I20130821-18:31:42.110(-4)? To verify your account email, simply click the link below.
I20130821-18:31:42.110(-4)? http://localhost:3000/#/verify-email/C2vJeaDLeMkkWmcRY
I20130821-18:31:42.111(-4)? Thanks.
I20130821-18:31:42.111(-4)? ====== END MAIL #0 ======
所以看起来它从服务器发送电子邮件但我从未在收件箱中收到验证邮件 . 我尝试了多次,已经超过一个小时了!我还查看了垃圾邮件文件夹 . 是什么赋予了?
提前致谢
2 回答
看这里:http://docs.meteor.com/#email
像Meteor这样的Web服务器不能自己发送电子邮件,他们需要一台SMTP服务器才能这样做 . 您需要设置一个并使用
MAIL_URL
变量进行设置 .要配置
MAIL_URL
,请不要忘记添加核心电子邮件包:然后,服务器端:
Read More :Verify an Email with Meteor Accounts .