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

  • Question

  • 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();

    Regards


    iqasas

    Monday, May 18, 2015 12:45 PM

Answers

  • hi Monunir

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

    Regards


    iqasas

    Tuesday, May 19, 2015 11:31 AM

All replies

  • Hello Iqasas,

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

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

    Regards,

    Mounir

    Monday, May 18, 2015 3:13 PM
  • hi Monunir

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

    Regards


    iqasas

    Tuesday, May 19, 2015 11:31 AM