SmtpMail.ImportTextBody Method

Imports text source from file or remote website to text body of the e-mail message.

[Visual Basic]
Public Sub ImportTextBody( _
    fileName As String, _
    options As ImportTextBodyOptions _
public void ImportTextBody(
    string fileName,
    ImportTextBodyOptions options
public: void ImportTextBody(
    String* fileName,
    ImportTextBodyOptions^ options
public function ImportTextBody( 
    fileName : String,
    options : ImportTextBodyOptions* options


A full file name or URL.
Any combination of ImportTextBodyOptions values


[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 Email Text Body]
Dim oMail As SmtpMail = New SmtpMail("TryIt")
oMail.ImportTextBody("", _ 

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

oMail.ImportTextBody( "c:\test.txt", _
	ImportTextBodyOptions.NoOptions )

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

[C# - Import Email Text Body] SmtpMail oMail = new SmtpMail("TryIt"); oMail.ImportTextBody("", ImportTextBodyOptions.ConvertHtmlToText); oMail.SaveAs( "c:\\google.eml", true ); oMail.ImportTextBody("c:\\test.txt", _ ImportTextBodyOptions.NoOptions); oMail.SaveAs("c:\\test.eml", true);

See Also

SmtpMail.TextBody Property
SmtpMail.ImportHtmlBody Method
SmtpMail.ImportHtml Method