Hi,

I am making a form in asp.net 3.5 which will send an email to the recipient

Initially I was using system.web.mail

as it is obvious whenever you send an email to some recipient a display name appears instead

of theemail id of the sender

consider:

mail_sender=mail@gmail.com

display_name="my name"

in my case instead of the display_name "mail" the initial portion of the sender's email id is coming

but it is desired that "my name" should appear in the recipient's inbox.

due to this I had to switch to system.net.mail

but there also same problem occurs.

I have tried googling on this issue too, but still no help.

Any help shall be appreciated !

thanks
shankbond

use:
MailAddress from = new MailAddress(mailFrom , "ItWorld");

for more detail see <UR SNIPPED>

Hi Alisattar,
thanks for the reply

use:
MailAddress from = new MailAddress(mailFrom , "ItWorld");

for more detail see <UR SNIPPED>

I forgot to tell You that I am sending the mail with the help of webservice. I tried the code you have send me , but the display name seems to appear only when I don't use a webservice, but when I use a webservice the display name doesn't come?

please help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.