Dear Support,
I was able to get your code working:
1. I have create report in reporting services 2008 r2 and export as .mhtml
2. Use your code to create draft email as file(msg)
3. create a new email attach the draft (in step 2) forward to my manager.
4. My Manager then open up the draft email and press send.
5. I have a problem when the message is received after step 4.
On iPad Email, when I open it up there are no Images on the page or (even image as an attachment).
On Android Honeycomb v3.1 Email, The Image does not appear in the content of the email but appeared as an attachment, therefore I see crosses on the screen.
Did I miss some setting in Aspose network component ?
If I get this to work my manager will be very happy.
Our staff have access to iPad/Android tablet.
and if I can get the image to show properly this would be brilliant.
That mean we can utilize Aspose Network Module to help us send formatted report to our internal staff.
I have attached 4 file:
1. message.mhtml (export from reporting services 2008 r2)
2. message.msg (created from aspose network module)
3. draft email as at 14072011.msg is the message received by the manager.
then the message.msg get open and send.
receipt email/Final email received:
4. Sample Letter via Reporting Services (Input to the report is IRN).msg
Many Thanks.
Regards Dat.
try
{
msg = MailMessage.Load(messagebody_filename, MessageFormat.Mht);
msg.From = from;
msg.To = to;
if (cc != null && cc.Length > 0)
{
msg.CC = cc;
}
<SPAN style="COLOR: blue">if</SPAN> (bcc != <SPAN style="COLOR: blue">null</SPAN> && bcc.Length > 0)
{
msg.Bcc = bcc;
}
<SPAN style="COLOR: blue">if</SPAN> (subject != <SPAN style="COLOR: blue">null</SPAN> && subject.Length > 0)
{
msg.Subject = subject;
}
<SPAN style="COLOR: #2b91af">MapiMessage</SPAN> mapiMsg = <SPAN style="COLOR: #2b91af">MapiMessage</SPAN>.FromMailMessage(msg);
mapiMsg.SetMessageFlags(<SPAN style="COLOR: #2b91af">MapiMessageFlags</SPAN>.MSGFLAG_UNSENT | <SPAN style="COLOR: #2b91af">MapiMessageFlags</SPAN>.MSGFLAG_FROMME);
mapiMsg.Save(output_filename);
}
<SPAN style="COLOR: blue">catch</SPAN> (<SPAN style="COLOR: #2b91af">Exception</SPAN> ex)
{
<SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(ex.Message);
<SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(ex.StackTrace);
}</PRE><PRE style="FONT-FAMILY: Lucida Sans Typewriter; BACKGROUND: white; COLOR: black; FONT-SIZE: 13px"> </PRE>