Hi,
I'm facing an issue when I use the MicrosoftMail option for emailing the crystal report. My code is as follows -
MicrosoftMailDestinationOptions mailOpts = new MicrosoftMailDestinationOptions();
ExportOptions exOpts = new ExportOptions();
ExcelFormatOptions xlOpts = new ExcelFormatOptions();
xlOpts.ExcelTabHasColumnHeadings = true;
xlOpts.ExcelUseConstantColumnWidth = false;
xlOpts.ExcelConstantColumnWidth = 300;
report.ExportOptions.ExportFormatType = ExportFormatType.Excel;
report.ExportOptions.ExportDestinationType = ExportDestinationType.MicrosoftMail;
report.ExportOptions.FormatOptions = xlOpts;
mailOpts.MailToList = "
[email protected]";
mailOpts.MailSubject = "Report";
mailOpts.MailMessage = "Generated using Crystal Reports";
mailOpts.UserName = "username";
mailOpts.Password = "password";
report.ExportOptions.DestinationOptions = mailOpts;
report.Export();
When I execute this code, I get an error Error 19 returned by function <MAPILogon>. I'm unable to solve this issue! I'm unable to identify what "Error 19.." means.
I'm using VS.NET 1.0.3705, C#, Win2K professional and Microsoft Outlook as the default mail client. In the Control Panel -> Mail, I've created an account in which the details pertaining to the POP, SMTP, Account Name, Password and LAN connection is provided.
Any guidance on this topic, will be of great help to me.
TIA
Praveen