Titanium 如何通过Tianium移动应用程序发送电子邮件
如何通过钛移动应用程序发送电子邮件。Titanium 如何通过Tianium移动应用程序发送电子邮件,titanium,Titanium,如何通过钛移动应用程序发送电子邮件。 我收到“localhost denied”错误我猜您使用了类似于mailto的东西:email@mydomain.com 您应该使用电子邮件对话框: 这应该对你有用 var emailDialog = Titanium.UI.createEmailDialog() emailDialog.subject = "Hello from Titanium"; emailDialog.toRecipients = ['foo@yahoo.com']; emailDi
我收到“localhost denied”错误我猜您使用了类似于
mailto的东西:email@mydomain.com
您应该使用电子邮件对话框:
这应该对你有用
var emailDialog = Titanium.UI.createEmailDialog()
emailDialog.subject = "Hello from Titanium";
emailDialog.toRecipients = ['foo@yahoo.com'];
emailDialog.html = '<b>Appcelerator Titanium Rocks!</b>';
emailDialog.open();
var-emailDialog=tianium.UI.createEmailDialog()
emailDialog.subject=“你好,来自Tianium”;
emailDialog.toRecipients=['foo@yahoo.com'];
emailDialog.html='Appcelerator Tianium Rocks!';
emailDialog.open();
如果您想在没有对话框的情况下发送电子邮件,请尝试对Web服务器进行AJAX调用,然后在服务器上发送
在没有对话框的情况下通过电话发送是不可能的。本比萨饼订购应用程序教程根据用户选择发送电子邮件
使用这个:-
mail.addEventListener('click', function(e) {
var emailDialog = Titanium.UI.createEmailDialog();
if (!emailDialog.isSupported()) {
Ti.UI.createAlertDialog({
title:'Error',
message:'Email not available on this device.'
}).show();
return;
}
emailDialog.setSubject(' Gmail !!!!!!!! ');
emailDialog.setToRecipients(['abc@gmail.com']);
emailDialog.setMessageBody('Hi,\n I am working with appcelerator.');
emailDialog.setHtml(false);
emailDialog.setBarColor('#336699');
emailDialog.addEventListener('complete',function(e){
if (e.result == emailDialog.SENT){
if (Ti.Platform.osname != 'android'){
alert("message was sent");
}
}else{
alert("message was not sent. " );
}
});
}
斯巴达克斯:谢谢:)您是否使用电子邮件对话框发送电子邮件?不,我没有使用它。我只想从titamiun移动应用程序发送电子邮件。没有对话,请告诉我,实际上我只想从titamiun移动应用程序发送电子邮件。如果没有对话框,那么您应该对发送电子邮件的服务器进行AJAX调用
mail.addEventListener('click', function(e) {
var emailDialog = Titanium.UI.createEmailDialog();
if (!emailDialog.isSupported()) {
Ti.UI.createAlertDialog({
title:'Error',
message:'Email not available on this device.'
}).show();
return;
}
emailDialog.setSubject(' Gmail !!!!!!!! ');
emailDialog.setToRecipients(['abc@gmail.com']);
emailDialog.setMessageBody('Hi,\n I am working with appcelerator.');
emailDialog.setHtml(false);
emailDialog.setBarColor('#336699');
emailDialog.addEventListener('complete',function(e){
if (e.result == emailDialog.SENT){
if (Ti.Platform.osname != 'android'){
alert("message was sent");
}
}else{
alert("message was not sent. " );
}
});
}