我希望我的应用程序从应用程序内部发送电子邮件。目前在发送电子邮件时使用以下代码,但在发送之前首先打开我的电子邮件应用程序。
public void EmailUs() {
//email Id to send the mail to
string email = "test@gmail.com";
//subject of the mail
string subject = MyEscapeURL("INQUIRY");
//body of the mail which consists of Device Model and its Operating System
string body = "";
int k = 1;
do {
body = MyEscapeURL ("Please Enter your message here\n\n\n\n" +
"________" +
Application.OpenURL ("mailto:" + email + "?subject=" + subject + "&body=" + body);
} while(k != num);
}
string MyEscapeURL (string url)
{
return WWW.EscapeURL(url).Replace("+","%20");
}
是否可以在不打开邮件的情况下从应用程序内部发送电子邮件?谢谢!
答案 0 :(得分:2)
是的,你可以,这是一个应该完成这项工作的脚本!
np.float64