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 _ )
[C#] public void ImportTextBody( string fileName, ImportTextBodyOptions options );
[C++] public: void ImportTextBody( String* fileName, ImportTextBodyOptions^ options );
[JScript] public function ImportTextBody( fileName : String, options : ImportTextBodyOptions* options );
Parameters
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 Email Text Body] Dim oMail As SmtpMail = New SmtpMail("TryIt") oMail.ImportTextBody("http://google.com", _ ImportTextBodyOptions.ConvertHtmlToText) 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("http://google.com", 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