Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi ,

Hope u are doing well !!!

In one of my projects I am using SMTP client for sending mail.
My SMTP Host is : smtp.bizmail.yahoo.com.

I am using sender mail id as original@ABC.com and which exists.

I want when the user receive this mail the sender mail id should be shown as welcomemail@ABC.com and this one is dummy mail id.

I have tried for displayName property, it shows display name but still original sender mail id is intact.

Can you please guide me for this ?.


Thanks,
Hemant Thakar.
Posted
Updated 14-Feb-13 20:18pm
v2
Comments
bbirajdar 15-Feb-13 3:22am    
You will have to use SMTP server from abc.com

If it would have been possible what you are asking for, then everybody would be using GMail server for sending emails instead of setting up their own..

1 solution

When you create the MailAddress instance for the From property of the MailMessage class instance, there is an override constructor that does that: http://msdn.microsoft.com/en-us/library/1s17zfkf.aspx[^]
There is a generic routine that includes it here: Sending an Email in C# with or without attachments: generic routine.[^]
 
Share this answer
 
Comments
Hemant Thaker 15-Feb-13 4:18am    
Thanks,

Using DisplayName will show display name but it will not eliminate sender email id. Sender Id is still visible in mail.
OriginalGriff 15-Feb-13 4:41am    
Correct - you can't completely spoof your email address to prevent spam emails pretending to be from a genuine company.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900