Click here to Skip to main content
13,343,083 members (58,012 online)
Rate this:
Please Sign up or sign in to 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 :

I am using sender mail id as and which exists.

I want when the user receive this mail the sender mail id should be shown as 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 ?.

Hemant Thakar.
Posted 14-Feb-13 21:17pm
Updated 14-Feb-13 21:18pm
aspnet_regiis -i 15-Feb-13 3:22am
You will have to use SMTP server from

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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

When you create the MailAddress instance for the From property of the MailMessage class instance, there is an override constructor that does that:[^]
There is a generic routine that includes it here: Sending an Email in C# with or without attachments: generic routine.[^]
Hemant Thaker 15-Feb-13 4:18am

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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180111.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100