Sender Name doesn't appear to the recipients , when the email is sent

Dear Team

for specific purpose  , I am using the message Class in CDO to send emails ,

but the problem is that the sender name or address does not appears ,

here is the code I used

CDO.Message oMessage = new CDO.Message();
ADODB.Stream oStream = new ADODB.Stream();
oStream.Charset = "ascii";
oStream.Open();
oStream.WriteText(MHTmessage);
oMessage.DataSource.OpenObject(oStream, "_Stream");

   ADODB.Fields oFields = oMessage.Configuration.Fields;
   oFields["http://schemas.microsoft.com/cdo/configuration/sendusing"].Value = CDO.CdoSendUsing.cdoSendUsingPort;
   oFields["http://schemas.microsoft.com/cdo/configuration/smtpserver"].Value = smtpAddress;

   oFields.Update();

  oMessage.MimeFormatted = true;
  oMessage.Subject = subject;
  oMessage.Sender = emailFrom;
  oMessage.To = emailTo;
  oMessage.CC = emailcc;

oMessage.Send();

R

May 18th, 2015 8:47am

Hello Iqasas,

using cdo you can provide the DisplayName and the SMTP adresse like that : 

oMessage .From = """DisplayName"" <smtp@domain.com>" 

Regards,

Mounir

Free Windows Admin Tool Kit Click here and download it now
May 18th, 2015 11:15am

hi Monunir

Thanks a lot , it working , it toke from me more than two weeks searching ,

Regards

May 19th, 2015 7:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics