none
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.AutodiscoverUrl("one@xxx.edu")
    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 <one@xxx.edu>;")

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

      msg. From=new EmailAddress("one@xxx.edu", "Custom Display Name");

                msg.Send()

    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