如何通过电子邮件链接(URL)

时间:2012-09-24 08:32:06

标签: email blackberry

我正在显示包含一些文字和一张图片的页面。我想将此页面的URL通过电子邮件发送给一些朋友。怎么做?

1 个答案:

答案 0 :(得分:1)

检查此 -

 Store store = Session.getDefaultInstance().getStore();
 Folder[] folder = store.list(Folder.SENT);
 Folder sent = folder[0];
 Message msg = new Message(sent);
 Address receipent[] = new Address[1];
 try
    {
     receipent[0] = new Address(To_Address, name);
     msg.addRecipients(Message.RecipientType.TO, receipent);
     msg.setSubject("Test Mail");
     msg.setContent("This mail is to remind you that programmatically we can send the mail");
     msg.setPriority(Priority.HIGH);
     Transport.send(msg);
    }

  catch (Exception e)
         {
                e.printStackTrace();
          }