Hi all
I have a function that uses CDO to send emails with request to have a delivery receipt when the mail reacehes the recepient.
I use the following code:
CDO.Message msg = new CDO.Message();
CDO.Configuration conf = new CDO.Configuration();
conf.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"].Value = 1;
conf.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"].Value = txtHost.Text; conf.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"].Value = 25; conf.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"].Value = txtPass.Text; conf.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"].Value = txtUser.Text;
conf.Fields.Update();
msg.Configuration = conf;
msg.To = txtTo.Text;
msg.From = txtFrom.Text;
msg.Subject = txtSubject.Text+" " + DateTime.Now;
msg.HTMLBody = txtBody.Text;
msg.BodyPart.Charset = "utf-8";
msg.DSNOptions = CdoDSNOptions.cdoDSNSuccessFailOrDelay;
msg.Fields.Update();
msg.Send();
Now this works fine on my local machine with my web server. but when used in the production server with another mail server the delivery receipts were not received.
I believe there must be a difference between my mail server and the production mail server but I don't know what can it be exactly.
so please if anybody has faced such a problem before, tell me what to do
thanks