07-17-2008 12:08 PM
Is there a way to launch the default email editor programtically? I haven't been able to find a class that supports such operation. I have been thinking about launching the browser with a 'mailto' URL, but that is more of a hack. I am thinking there much be a better way to do this. Anybody ideas? Thanks!
Solved! Go to Solution.
07-17-2008 12:19 PM
Is this what you're looking for?
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(MessageArguments.ARG_NEW, "email@example.com", "", ""));
07-17-2008 06:40 PM
07-17-2008 06:53 PM
AFAIK, we can't specify an attachment when launching the mail client with Invoke.
The only alternative I can think of is to create your own email interface; collect whatever info you need from the user, and then send the message w/ attachment using Transport. That's a little more involved than simply launching the native email client though.
07-18-2008 12:17 AM - edited 07-18-2008 12:28 AM
You can call Invoke.invokeApplication() by sending it new MessageArguments(Message).
Your attachment will go in the SupportedAttachmentPart.
Message message = new Message();
Multipart multipart = new Multipart();
multipart.addBodyPart( new TextBodyPart( multipart, "This is the body." ) );
multipart.addBodyPart( new SupportedAttachmentPart( multipart, mime, filename, buffer ) );
message.setSubject( "This is the subject." );
message.setContent( multipart );
Invoke.invokeApplication( Invoke.APP_TYPE_MESSAGES, new MessageArguments( message ) );
The filename is whatever you want the attachment name to be.
07-18-2008 10:38 AM
Here is a link to one of our samples that creates and sends a message with an attachment.
How To - Create an attachment
Article Number: DB-00009
11-18-2008 05:47 PM
what is the maximum size of an attachment? We get a ""Failed to contact service" error if we attach more than 4K even if we split them into multiple attachments having each less than 4K.
Tested with 8310/188.8.131.52, 8900/184.108.40.206 and 9000/220.127.116.11. Devices are connected to BIS 2.4.
11-28-2008 04:18 PM
I haven't been able to reproduce this. I tested with a 70k file. The limit should be in the megabytes range. Are you able to attach large files and send them using the built in Messages application?