我尝试在用户在我的应用中注册后设置电子邮件验证但我收到了#34;内部服务器错误"
以下是我创建注册表单的代码
<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>
如何设置此功能以向创建的用户的电子邮件发送电子邮件。我应该在哪里写发件人的电子邮件地址?
答案 0 :(得分:0)
Meteor.startup(function () {
process.env.MAIL_URL = 'smtp://postmaster%40meteorize.mailgun.org:YOURPASSWORD@smtp.mailgun.org:587';
});