我有以下代码:
dev = "email@gmail.com";
dev_p = "password";
subject = "Thank you for signing up to the company auditing app";
body = "<!DOCTYPE html><body>To " + username + ",\nThank you for signing up to the company auditing application.\nYou can login to your account via our website <a href='http://www.companyauditingapp.com/'>here</a>.\n Regards,\nThe Team</body></html>";
Spanned html = Html.fromHtml(body);
try{
GMailSender sender = new GMailSender(dev, dev_p);
sender.sendMail(subject,html,dev,emailadd);
} catch (Exception e) {
Log.e("SendMail", e.getMessage(), e);
}
我希望能够通过 sendMail 方法发送 html,在 eclipse 中它一直要求我将方法参数 - 字符串 html/body 更改为跨区字符串。
任何人都可以提出解决这个问题的方法吗?
提前致谢
克里斯