how to confirm email source

后端 未结 2 797
一向
一向 2021-01-13 02:27

I send an email from my smtp server, for example, setting From to anyemail@anydomain.com. The recipient will think that email comes from anydomai

相关标签:
2条回答
  • 2021-01-13 03:15

    Email Headers has more details.

    0 讨论(0)
  • 2021-01-13 03:16

    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");
    
    0 讨论(0)
提交回复
热议问题