通过 Appcelerator Cloud API 发送电子邮件 [英] Sending email through Appcelerator Cloud API

查看:32
本文介绍了通过 Appcelerator Cloud API 发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的 Titanium 应用中通过 Appcelerator Cloud Service 发送电子邮件.我使用的代码是标准代码,在文档站点给出.但是没有发送电子邮件.

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)));
    }
});

它给出了这个错误,找不到欢迎电子邮件模板".我在想模板是要通过电子邮件发送的消息.API 上没有关于此属性、模板的帮助.有人可以向我解释一下吗?我会很感激的.

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.

谢谢

推荐答案

该错误表明您尚未在 ACS 网站上创建电子邮件模板.以下步骤将帮助您创建电子邮件模板

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

  1. 登录您的 Appcelerator 应用控制台
  2. 点击您正在使用的应用下的管理 ACS"
  3. 点击电子邮件模板"标签
  4. 创建电子邮件模板".

您也可以如下设置您的 SMTP 设置,这对我有用.

also you can setup your SMTP settings as follows which worked for me.

用户名:________@gmail.com密码:gmail账号密码TLS:真/假(两者都可以)SMTP 地址:smtp.gmail.com端口:587域名:www.gmail.com

Username: ________@gmail.com Password: gmail account password TLS: true/ false (both will work) SMTP Address: smtp.gmail.com Port: 587 Domain : www.gmail.com

这篇关于通过 Appcelerator Cloud API 发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆