How to display an un-sent outlook message from a memory stream

Hi

I can create an un-sent outlook email message and get outlook to display it by using process.start. But how can I get outlook to display the email message if I save it as a memory stream?

If an answer could be provided in vb.net it would be greatly appreciated

Regards

Ian

Hi Ian,


Thank you for considering Aspose products.

I have done some research on your inquiry and I have learned it may not be possible. Process.Start(…) calls the executable with specified arguments as string which are then passed to the executable as command line options. I don’t think you can pass a MemoryStream as command line argument to an executable.

A workaround for your situation is to create a RAM Disk and write the stream to it. This way you are still keeping the file in Memory (assuming the disk operations are what worries you).

I am working on this idea and I will share my results here.

Hi Thanks for your reply.

I only use process.start on the file saved to disk as it was the simplest method. On the memory stream version I just want to display it for the user to send, there's a demo which does something similar but for the web. How would this work in a winform scenario?

Regards

Ian

ityrrell:
there's a demo which does something similar but for the web.

Can you please provide a link for us to review?

Hi

http://www.aspose.com/community/files/51/.net-components/aspose.email-for-.net/entry337085.aspx

In the project under the file-format folder there's a page called Create-Msg-Draft-Status. Run this, it creates a mail message as a memory stream and streams it to the browser.

My question is how can I do the equivalent of this in a winform app?

Regards

Ian

Hi Ian,


Thank you for sharing the requested link.

I have checked the said demo. These web demos use the Response Object Model to transfer the data to the client’s machine. The data is saved to some temporary location on client’s disk before it is presented to the user.

If your only need is to open the newly created message in Outlook, you can use the System.Diagnostics.Process.Start method for your need. All you have to do is to save your email file to some temporary location before passing it as a command argument. I believe you have already achieved this goal.