Email ends up in spam but only when sending from live website. Localhost works
e-mails are being sent but not received, i.e. marked as spam. Then your SMTP server is a SMTP service running on your localhost
spf=fail (google.com: domain of noreply@censoredDomain.se does not designate 126.96.36.199 as permitted sender)
Try adding the IP address (range) of the SMTP provider to your SPF record (or remove it completely).
You get that fail on both mails, so I do not know why one gets through, but the one failing is probalby caused by the SPF check.
Also the DKIM signature seems to be not correct:
dkim=temperror (no key for signature) header.i=@
You should check that with the SMTP provider.
I use it when sending emails from both localhost(when testing) and from the live website and both of them work. But the email sent from the live website always get flagged as spam, while the email from localhost is not flagged as spam.
Even if the sender email is the same. The content is the same. the title is the same and so on.
Does it actually see that I'm sending from a live website or from localhost when I'm sending through a third party SMTP service that isn't related to my webhost?
a cut from my code :
SmtpClient smtpClient = new SmtpClient(); System.Net.Mail.MailMessage mailMessage = new System.Net.Mail.MailMessage(); mailMessage.From = new MailAddress(sender); mailMessage.To.Add(recipient); mailMessage.Subject = title; mailMessage.Body = message; mailMessage.IsBodyHtml = false; smtpClient.Host = "smtpAddress"; smtpClient.UseDefaultCredentials = false; smtpClient.EnableSsl = false; smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; smtpClient.Port = 587; smtpClient.Credentials = new NetworkCredential("username", "password"); smtpClient.Send(mailMessage);
Email that got flagged as spam(Sent from live website)
Delivered-To: censoredAddress@gmail.com Received: by 10.107.132.3 with SMTP id g3csp14274iod; Thu, 4 Dec 2014 00:02:36 -0800 (PST) X-Received: by 10.202.225.197 with SMTP id y188mr5614041oig.94.1417680156083; Thu, 04 Dec 2014 00:02:36 -0800 (PST) Return-Path: <noreply@censoredDomain.se> Received: from tbjjbihbhcbji.turbo-smtp.net (tbjjbihbhcbji.turbo-smtp.net. [188.8.131.52]) by mx.google.com with SMTP id x10si17295964oek.84.2014.12.04.00.02.35 for <censoredAddress@gmail.com>; Thu, 04 Dec 2014 00:02:36 -0800 (PST) Received-SPF: fail (google.com: domain of noreply@censoredDomain.se does not designate 184.108.40.206 as permitted sender) client-ip=220.127.116.11; Authentication-Results: mx.google.com; spf=fail (google.com: domain of noreply@censoredDomain.se does not designate 18.104.22.168 as permitted sender) smtp.mail=noreply@censoredDomain.se; dkim=temperror (no key for signature) header.i=@ Message-Id: <5480151c.8a283c0a.71e4.678eSMTPIN_ADDED_MISSING@mx.google.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=censoredDomain.se; s=turbo-smtp; x=1418284956; h=DomainKey-Signature: Received:Received:MIME-Version:From:To:Date:Subject:Content-Type: Content-Transfer-Encoding; bh=7vEAgi0RRzjrn+4Le/fcS1k1+tJ/Ro6XDU 4TKOlZ0JY=; b=Yu5q4UjDuGv2L/Fa3MR+FO4+h3jWj5KHKvDGZFCyJYj0+aB7aV kgOix5W5zrlaJ0rbl39Ck08AORmO82jdcXzFdtFm5lst6ENG3JaWorxWyxduqWBI TY7ZSzs9HJb4TBXcMQvvaPdM96VA7FP3i4vb4Q9mkoGX1nD6c9asLirsE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=turbo-smtp; d=censoredDomain.se; h=Received:Received:X-TurboSMTP-Tracking:MIME-Version:From:To:Date:Subject:Content-Type:Content-Transfer-Encoding; b=ttGj0ZR2T0aPVS+Q+0oEdy5VM4wWzIBm2DtLYvtUFyHhldqWO5n2kVnZN3m1pR w0gGFX/r67i9FblNhg04ELxvsfO2+mHg0bhyTJgYOAPjS0DjoMBZI1WD2w/CTObN VMxSkTu8Hq8CDe49SRsduLnVLUdg2zwt86eNxItLLTno0=; Received: (qmail 1442 invoked from network); 4 Dec 2014 08:02:34 -0000 Received: from unknown (HELO Irwindale) (firstname.lastname@example.org) by turbo-smtp.com with SMTP; 4 Dec 2014 08:02:34 -0000 X-TurboSMTP-Tracking: 1692405204 MIME-Version: 1.0 From: noreply@censoredDomain.se To: censoredAddress@gmail.com
Click Here to Visit