G
Guest
Hi,
I have developed a windows application for our client, which informs
passengers thru email regarding a schedule change of flights. When i tested
it at my end, using their SMTP server, the mails were being sent but when
application was installed at client's place, using the same SMTP server,
mails are not being sent. I'm getting an error message -
System.Web.HttpException: Could not access 'CDO.Message' object. --->
System.Reflection.TargetInvocationException: Exception has been thrown by the
target of an invocation. ---> System.Runtime.InteropServices.COMException
(0x80040220): The "SendUsing" configuration value is invalid.
My code -
-----------------*******************--------------------------
SmtpMail.SmtpServer.Insert(0,["SMTP_Server_Name"]);
MailMessage mailMessage = new MailMessage();
mailMessage.BodyFormat = MailFormat.Html ;
mailMessage.From = fromEmailId;
mailMessage.To = toEmailId;
mailMessage.Subject = subject;
mailMessage.Body = body;
mailMessage.Headers.Add("Reply-To",reply_to);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout", 60);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", username);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", pwd);
SmtpMail.Send(mailMessage);
-----------------*******************--------------------------
Please help me out with this. It's urgent.
Thanks and Regards,
Pooja.
I have developed a windows application for our client, which informs
passengers thru email regarding a schedule change of flights. When i tested
it at my end, using their SMTP server, the mails were being sent but when
application was installed at client's place, using the same SMTP server,
mails are not being sent. I'm getting an error message -
System.Web.HttpException: Could not access 'CDO.Message' object. --->
System.Reflection.TargetInvocationException: Exception has been thrown by the
target of an invocation. ---> System.Runtime.InteropServices.COMException
(0x80040220): The "SendUsing" configuration value is invalid.
My code -
-----------------*******************--------------------------
SmtpMail.SmtpServer.Insert(0,["SMTP_Server_Name"]);
MailMessage mailMessage = new MailMessage();
mailMessage.BodyFormat = MailFormat.Html ;
mailMessage.From = fromEmailId;
mailMessage.To = toEmailId;
mailMessage.Subject = subject;
mailMessage.Body = body;
mailMessage.Headers.Add("Reply-To",reply_to);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout", 60);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", username);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", pwd);
SmtpMail.Send(mailMessage);
-----------------*******************--------------------------
Please help me out with this. It's urgent.
Thanks and Regards,
Pooja.