Author |
|
tcromer Newbie
Joined: 15 July 2009
Online Status: Offline Posts: 1
|
Posted: 15 July 2009 at 7:09am | IP Logged
|
|
|
Hi,
I am using the GetHtmlAndSaveRelatedFiles method of the MailMessage object to save messages to disk. Is there anyway I can get the message header/detail (From, Sent, To, Subject, etc...) included at the top of the html similar to what Outlook does when printing an email?
Is there a property I can set to have this included or will I need to manipulate the html manually to insert this?
Regards
Trent
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 16 July 2009 at 2:23am | IP Logged
|
|
|
Yes, you'll need to manipulate HTML content manually.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
rre Newbie
Joined: 04 September 2009 Location: Italy
Online Status: Offline Posts: 7
|
Posted: 08 September 2009 at 6:36am | IP Logged
|
|
|
Hi,
I had the same problem and the support suggest me to :
1) prepare an html string with to/from
2) attach the string received from GetHtmlAndSaveRelatedFiles
3) write the string.
My code:
8<-------------------------------------------
msg.Parser.WorkingFolder = tmpPath & TmpDir
sw = New StreamWriter(tmpPath & TmpDir & "\Index.html", False)
msg = pop.DownloadEntireMessage(pop.GetMessageIndexFromUid(Udi))
msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml
msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink
msg.Parser.Apply()
sw.write(MyHeader())
sw.Write(msg.GetHtmlAndSaveRelatedFiles(Nothing, VirtualMappingType.NonWeb, MessageFolderBehavior.CreateOnly))
[...]
Public Function MyHeader() As String
Dim result As String = ""
result += "<div class=MyHeader>" + (vbCrLf)
result += "<b>From :</b> Pippo <br>" + (vbCrLf)
'[and so on...]
result += "<hr />" + (vbCrLf)
result += "</p>" + (vbCrLf)
result += "</div>" + (vbCrLf)
Return result
End Function
8<-------------------------------------------
ciao
RRE
|
Back to Top |
|
|