вторник, 13 декабря 2005 г.

Using Reply-To with CDO to support SPF

Using Reply-To with CDO to support SPF: "Using Reply-To with CDO to support SPF
Mon, 18 Oct 2004 20:56:51 GMT

SPF is a great anti-spam method. It verifies that the SMTP server sending an email is authorised to send email on behalf of the domain in the FROM: header. However programmers don't seem to be helping. dasBlog and Wallop, as well as other numerous web applications, including ebay send emails using the address you give them. So when I sent out wallop invites to hotmail addresses they bounced.
Diagnostic-Code: smtp;550 207.68.176.8 does not pass SPF requirements for domain wallop@idunno.org

Damn right it didn't pass. My mail server is the only SMTP server that should be sending emails from my domain. So what do you, as a developer, do? The SMTP RFC provides an extra header for this purpose, Reply-To. Change your code to look something like
System.Web.Mail.MailMessage message = new System.Web.Mail.MailMessage();
message.To = 'someemail@some.example';
message.From = 'address@website.domain'; // Make sure this is from your web site domain
message.Subject = 'Subject';
message.Headers.Add('Reply-To','yourusers@email.com');// This is your users address

A well behaved MTU will then use the Reply-To as the destination address when you press reply. So considering Microsoft are now checking SPF on incoming emails to Hotmail why aren't sites like Wallop using Reply-To?"

Комментариев нет: