我正在单击一个按钮。单击按钮后,用户应移至“撰写电子邮件”屏幕。
问问题
267 次
2 回答
2
MessageArguments ma = new MessageArguments(MessageArguments.ARG_NEW, <recipients>, <subject>, <body>);
//Alternatively, if you don't want to provide default values: ma = new MessageArguments(MessageArguments.ARG_NEW);
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, ma);
于 2012-05-29T07:21:09.857 回答
1
这工作正常,试试这个,
public void SendMail()
{
String htmlContent = "Body part";
Message msg = new Message();
try
{
final Address address = new Address("","");
Address[] addresses = {address};
msg.addRecipients(net.rim.blackberry.api.mail.Message.RecipientType.TO, addresses);
msg.setContent(htmlContent);
msg.setSubject("Subject");
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(msg));
}
catch (AddressException e)
{
e.printStackTrace();
System.out.println("AddressException -->"+e.getMessage());
}
catch (MessagingException e)
{
e.printStackTrace();
System.out.println("MessagingException -->"+e.getMessage());
}
}
于 2012-05-29T07:27:16.653 回答