ImportHtmlBodyOptions Enumeration


Provides enumered values for options of importing html body.

[Visual Basic]
Public Enum ImportHtmlBodyOptions
[C#]
public enum ImportHtmlBodyOptions
[C++]
__value public enum ImportHtmlBodyOptions
[JScript]
public enum ImportHtmlBodyOptions

Members

Members name Description
NoOptions Specifies that the email imports html source to HtmlBody only.
ImportLocalPictures Specifies that the email imports all pictures (referenced in html source) on local disk as embedded pictures (inline attachment).
ImportHttpPictures Specifies that the email imports all pictures (referenced in html source) on remote website as embedded pictures (inline attachment).
ImportCss Specifies that the email imports css file used in html source.
ErrorThrowException Specifies that the SmtpMail class throws an exception when an embedded picture is unable to be imported.

Example

[Visual Basic, C#] The following example demonstrates how to import remote & local html source with EASendMail SMTP Component. To get the full samples of EASendMail, please refer to Samples section.

[VB - Import Html Body and Embedded Image]
Dim oMail As SmtpMail = New SmtpMail("TryIt")
oMail.ImportHtmlBody( "http://google.com", _ 
	ImportHtmlBodyOptions.ImportHttpPictures OR ImportHtmlBodyOptions.ImportCss )

oMail.SaveAs( "c:\google.eml", true )

oMail.ImportHtmlBody( "c:\test.htm", _
	ImportHtmlBodyOptions.ImportLocalPictures OR ImportHtmlBodyOptions.ImportCss )

oMail.SaveAs( "c:\test.eml", true )

[C# - Import Html Body and Embedded Image]
SmtpMail oMail = new SmtpMail("TryIt");
oMail.ImportHtmlBody( "http://google.com", 
	ImportHtmlBodyOptions.ImportHttpPictures | ImportHtmlBodyOptions.ImportCss );

oMail.SaveAs( "c:\\google.eml", true );

oMail.ImportHtmlBody( "c:\\test.htm", 
	ImportHtmlBodyOptions.ImportLocalPictures | ImportHtmlBodyOptions.ImportCss );

oMail.SaveAs( "c:\\test.eml", true );

See Also

SmtpMail.ImportHtmlBody Method
Attachment Class
SmtpMail.ImportHtml Method
SmtpMail.HtmlBody Property

Online Examples

C# - Send Email with Attachment
C# - Send Email with Embedded Images
VB - Send Email with Attachment
VB - Send Email with Embedded Images
C++/CLI - Send Email with Attachment
C++/CLI - Send Email with Embedded Images