我的带有帐户套餐的Meteor应用程序为什么不发送验证电子邮件? [英] How come my Meteor app with accounts package is not sending a verification email?
问题描述
我正在制作一个流星应用程序,并且添加了mrt accounts-password软件包以及mrt accounts-ui-bootstrap-dropdown.
I am making a meteor app and I have the mrt accounts-password package added as well as mrt accounts-ui-bootstrap-dropdown.
我添加了登录按钮,以便用户可以创建一个帐户,并且效果很好.我正在使用所有默认值.
I have added the loginbuttons so users can create an account and that works just fine. I am using all defaults.
在服务器上,我有以下代码:
On the server I have the code:
Accounts.config({
sendVerificationEmail: true,
forbidClientAccountCreation: false
});
当我创建一个新帐户时,服务器控制台将打印:
And when I create a new account, the server console prints:
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 ======
因此,它看起来像是从服务器发送电子邮件,但我从未在收件箱中收到验证电子邮件.我尝试了多次,已经超过一个小时了!我还检查了我的垃圾邮件文件夹.有什么作用?
So it looks like it sends the email from the server but I never get the verification email in my inbox. And I tried multiple times and it has been over an hour! I also checked my spam folder. What gives?
预先感谢
推荐答案
请参见此处: http://docs. meteor.com/#email
如果未设置MAIL_URL(例如,在本地运行应用程序时),则Email.send会将消息输出到标准输出
If MAIL_URL is not set (eg, when running your application locally), Email.send outputs the message to standard output instead
诸如Meteor之类的Web服务器无法自行发送电子邮件,它们需要SMTP服务器来执行此操作.您需要设置一个并使用MAIL_URL
变量进行设置.
Web servers such as Meteor cannot send emails by themselves, they need a SMTP server to do that. You need to set up one and set it with MAIL_URL
variable.
这篇关于我的带有帐户套餐的Meteor应用程序为什么不发送验证电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!