问题描述
我正在尝试通过Appcelerator云服务发送电子邮件,在我的Titanium应用程序中.我正在使用的代码是在文档站点上给出的标准版本.但是没有发送电子邮件.
Cloud.Emails.send({ template: 'welcome', recipients: '*******@gmail.com' }, function (e) { if (e.success) { Titanium.API.info('Email sent successfully.'); } else { Titanium.API.info('Error:\\n' + ((e.error && e.message) || JSON.stringify(e))); } });
它给出了此错误,"未找到电子邮件模板".我在认为模板是用电子邮件发送的消息.关于此属性的API没有帮助,模板.有人能解释一下吗?我会感恩.
thanx
推荐答案
错误显示您还没有在ACS网站上创建电子邮件模板.以下步骤将帮助您创建电子邮件模板
- 登录您的Appcelerator应用程序控制台
- 在您正在处理的应用程序下单击"管理ACS",您正在处理
- 单击"电子邮件模板"选项卡
- "创建电子邮件模板".
还可以设置您的SMTP设置,如下所示,这适用于我.
用户名: _ __ _ ____ @ Gmail.com 密码:Gmail帐户密码 TLS:真/假(两者都将起作用) SMTP地址:smtp.gmail.com 端口: 587 域名:www.gmail.com
其他推荐答案
该错误意味着您还没有在ACS网站上创建电子邮件模板.登录您的 appcelerator应用程序控制台,点击您正在处理的应用程序下的"管理ACS" ,然后单击"电子邮件模板"选项卡,然后"创建电子邮件模板".
问题描述
I was trying to send email through Appcelerator Cloud Service, in my Titanium app. The code I'm using is the standart one, given at the documentation site. But the email is not being sent.
Cloud.Emails.send({ template: 'welcome', recipients: '*******@gmail.com' }, function (e) { if (e.success) { Titanium.API.info('Email sent successfully.'); } else { Titanium.API.info('Error:\\n' + ((e.error && e.message) || JSON.stringify(e))); } });
It give the this error, 'Email template welcome is not found'. I was thinking that template is the message to be sent in email. There is no help on API about this attribute , template. Can anybody explain it to me? I'll be thankful.
Thanx
推荐答案
The error shows that you haven't created an email template on the ACS website yet. The following steps will help you to create email template
- Log in to your Appcelerator App Console
- click "Manage ACS" under the app you're working on
- click the "Email Templates" tab
- "Create an Email Template".
also you can setup your SMTP settings as follows which worked for me.
Username: ________@gmail.com Password: gmail account password TLS: true/ false (both will work) SMTP Address: smtp.gmail.com Port: 587 Domain : www.gmail.com
其他推荐答案
That error means you haven't created an email template on the ACS website yet. Log in to your Appcelerator App Console, click "Manage ACS" under the app you're working on, then click the "Email Templates" tab, and "Create an Email Template".