We have a domain name "www.mycloudcctv.com" at godaddy.com and we have created a sub domain cam.mycloudcctv.com which points to 212.78.237.157 We have an application running on third party server (212.78.237.157). This application wants to send an email on our behalf using the email address “alerts@ mycloudcctv.com ". Following code snippet (ASP.NET) is being used to send the email from (212.78.237.157)
var mailClient = new SmtpClient(); mailClient.Credentials = new NetworkCredential { UserName = "alerts@mycloudcctv.com", Password = "xyz" }; mailClient.Port = 25; mailClient.Host = "smtpout.secureserver.net"; mailClient.EnableSsl = false; var mail = new MailMessage("alerts@mycloudcctv.com", "azharmalik3@hotmail.com", "Test Smtp server", "Testing mycloudcctv server") { IsBodyHtml = true }; //Now Send the message mailClient.Send(mail);
Everything works fine and emails are being sent however they end up in SPAM/JUNK folders of gmail/hotmail/yahoo. Could you please provide us necessary information so that our emails go to inbox instead of spam folders?
this is a BIG question with lots of complex issues, but it really boils down to three main areas:
Does the email come from a server which has be delegated the authority to deliver emails for the specified domain?
Is the content of the email just hyperlinks and does it contain text which would trigger spam assassin to mark as spam.
Is your server blacklisted for spam
For point 1 look into how to setup SPF records for send authority. http://www.mydigitallife.info/how-to-set-up-and-create-sender-policy-framework-spf-domain-dns-txt-record-with-wizard/
For point 2 get a copy of spam assassin and run your emails through it to see the score. http://spamassassin.apache.org/
For point 3 http://whatismyipaddress.com/blacklist-check
This is not that easy. There are fair few things you have to do. For example SendGrid has some guidelines:
http://support.sendgrid.com/entries/21194967-deliverability-101
I found this blog-posting extremely useful! Give it a good read, it covers a lot of the points already mentioned here thus far:
http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html
来源:https://stackoverflow.com/questions/11207629/email-goes-to-spam-instead-of-inbox