【发布时间】:2017-03-11 02:40:58
【问题描述】:
用户在我的应用中注册后,我正在尝试设置电子邮件验证,但我收到“内部服务器错误”
这是我创建注册表单的代码
<template name="LoginModal">
{{#if $not currentUser }}
{{> atForm}}
{{/if}}
</template>
//code inside the client folder to configure email verification
AccountsTemplates.configure({
confirmPassword:false,
termsUrl:'terms-of-use',
privacyUrl:'privacy',
sendVerificationEmail: true,
enforceEmailVerification:true,
forbidClientAccountCreation: true
});
//Here is my route to load the signup form
Router.route('/admin/addUser',{
action: function () {
BlazeLayout.render('master_layout',
{body:'LoginModal',dashboard:'UserDashboard',pageHeader:'AddUserHeader'});
}
});
//No any other routes for sign up has been configured.
//我收到的错误
(Mail not sent; to enable sending, set the MAIL_URL environment variable.)
I20170311-20:56:01.885(5.5)? MIME-Version: 1.0
I20170311-20:56:01.886(5.5)? Date: Sat, 11 Mar 2017 15:26:01 +0000
I20170311-20:56:01.887(5.5)? From: "Meteor Accounts" <no-reply@meteor.com>
如何设置此功能以将电子邮件发送到创建的用户的电子邮件。我应该在哪里写发件人的电子邮件地址?
【问题讨论】:
-
你发布的代码看起来不错..你能展示你如何配置路线的代码吗?尝试评论内容以查看问题何时消失。 This projcet 正在使用 AccountsTemplates,如果你想与之比较的话。
-
我现在在户外。我一回到家就会发布代码。难道不需要在代码中的某处包含发件人的电子邮件地址吗?我没有在任何地方做过所以我想知道 tge 电子邮件是如何发送的……
-
AccountsTemplates 处理所有这些。您需要的是一个 url,否则它将在服务器日志(终端)上打印电子邮件。
-
@mutdmour 谢谢..我用路线代码编辑了我的问题。希望你找到错误。
-
我对代码做了一些更改。现在显示了一个新错误。我在问题中添加了它。如何设置网址?