Description
Namespace:
DuoDimension.Databeam
Assembly: Databeam.Excel (in Databeam.Excel.dll)
Version: 2.0.0.0
CopyC#
CopyVB.NET
Sends HTML file by email. But the method doesn't allow send a mail via smtp server with secure authentication.
Assembly: Databeam.Excel (in Databeam.Excel.dll)
Version: 2.0.0.0
Syntax
C# | Visual Basic |
Parameters
- FileName
- String
HTML file that will be send as an email.
- AddressFrom
- String
The address of sender.
- AddressTo
- String
The addres of recipient.
- Subject
- String
The theme of the letter.
- SmtpServerFrom
- String
Smtp server.
- UserName
- String
The user name for authentication on SMTP server.
- Password
- String
The password for authentication on SMTP server
Return Value
0 - Ok. File has been sent to the recipient.
1 - Can't open the file. Check FileName parameter.
2 - Smtp Server rejected the letter.
Examples

DuoDimension.Databeam.Excel convert = new DuoDimension.Databeam.Excel("*******"); if (convert.IsExcelInstalled == true) { convert.OpenXls(@"D:\Sample Excel File.xls"); if (connvert.ReturnCode == 0) { convert.XlsToHtml(1, "", @"d:\testmail.html"); if (convert.ReturnCode == 0) convert.SendHTMLMail(@"d:\testmail.html", "frog@yahoo.com", "fox@hotmail.com", "my test", "smtp.server.net", "frog_user", "frog_pass"); } }

Dim convert As New DuoDimension.Databeam.Excel("*******") If convert.IsExcelInstalled = True Then If convert.ReturnCode = 0 Then convert.XlsToHtml(1, "", "d:\testmail.html") If convert.ReturnCode == 0 Then convert.SendHTMLMail("d:\testmail.html", "frog@yahoo.com", "fox@hotmail.com", "my test", "smtp.server.net", "frog_user", "frog_pass") End If End If End If
See Also
Excel Class
DuoDimension.Databeam Namespace