olMailItem.HTMLBody := '<a href="http://xxxxx.com/boletin/boletin.html"/a>'; //If we want to send in HTML format olMailItem.BodyFormat := 2; olMailItem.Display(ShowNewMailDialogOnSend); //If we want to display outlook dialog window olMailItem.Send;
//descargamos el fichero HTMl de la URL lHttpWebRequest := lHttpWebRequest.Create(pURL); lHttpWebRequest.Method :='GET'; lHttpWebRequest.KeepAlive := TRUE; lHttpWebRequest.AllowAutoRedirect := TRUE; lHttpWebRequest.UseDefaultCredentials := TRUE; lHttpWebRequest.Timeout := 60000; lTempBLob.INIT; lTempBLob.Blob.CREATEINSTREAM(lResponseInStream); lWebRequestHelper.GetWebResponse(lHttpWebRequest,lHttpWebResponse,lResponseInStream,lHttpStatusCode,lResponseHeaders,GUIALLOWED); lTempBLob.INSERT; lTempBLob.CALCFIELDS(Blob); lFileMgt.BLOBExport(lTempBLob,'C:\Users\Public\Documents\boletin\boletin.html',TRUE); MyFile.OPEN('C:\Users\Public\Documents\boletin\boletin.html'); MyFile.CREATEINSTREAM(StreamInTest); WHILE NOT StreamInTest.EOS DO BEGIN StreamInTest.READTEXT(Buffer); WholeBody := WholeBody + Buffer; END; MyFile.CLOSE;
StreamInTest InStream Buffer Text lHttpWebRequest DotNet System.Net.HttpWebRequest.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' lTempBLob Record TempBlob lResponseInStream InStream lWebRequestHelper Codeunit Web Request Helper lHttpWebResponse DotNet System.Net.HttpWebResponse.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' lHttpStatusCode DotNet System.Net.HttpStatusCode.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' lResponseHeaders DotNet System.Collections.Specialized.NameValueCollection.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' lFileMgt Codeunit File Management
Answers
e.g.
olMailItem.HTMLBody := '<!doctype html><html lang=en><head><meta charset=utf-8><title>blah</title></head><body><p>I'm the content</p><a href="http://xxxxx.com/boletin/boletin.html"/a></body></html>'
I hope this helps.
Variables:
I've just found another problem with this...
Is it possible to add to the body of the mail content that it's no in HTML, apparte from the already added HTML?
Thank you very much