How to change a custom display name ? RRS feed

  • Question

  • Dim service As ExchangeService = Nothing
    Dim msg As EmailMessage = Nothing
     service = New ExchangeService(ExchangeVersion.Exchange2007_SP1)
    service.Credentials = New WebCredentials(User, Password, Domain)

                msg = New EmailMessage(service)
                msg.ToRecipients.Add(New EmailAddress(pRecipient))
                msg.Subject = pSubject
                msg.Body = New MessageBody(BodyType.HTML, pBody)
                'msg.From = New EmailAddress("custom display name <>;")

    '    msg.From.Name="custom display name"

      msg. From=new EmailAddress("", "Custom Display Name");


    I tried the above three ways to change the display name, but either of them work. Any help, please, Thanks

    Wednesday, March 25, 2015 7:39 PM

All replies