if i send email from my smtp server, For Example in code if i set From
to [email protected] and sent to an email address, than the recipient think that mail comes from anydomain
. so how to confirm email source?
views:
81answers:
2
+3
A:
There are several approaches to dealing with email forgery:
- Use PGP or SSL signed certificates
- Use SPF
- check the
Received
headers (although this isn't reliable) - reply back to the sender and ask if they actually sent it. If you know the sender, maybe ask them in person or over the phone.
The main thing to realise is that the From: address isn't any form of guarantee about the originator of a message.
Edit: okay I now understand that you're just trying to tag the mail message somehow so that you can recognise which server generated it (in a non-secure way). Here's how using .NET's MailMessage:
System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
msg.Headers.Add("X-Is-Development", "true");
p00ya
2010-03-09 05:57:23
smtp server are different. can you give any example how to set headers in c#
2010-03-16 10:40:29
Received headers prove nothing? Need SSL/PGP or other pre-arranged token
TFD
2010-03-16 19:35:05