# How to send mass email and not get treated as spam

I have a very important announcement to send the more than 300k members of my website. I already have email sending software but they result in spam. So I want to improve my chances of reaching my members' inbox.

Alright my domain registrar is GoDaddy, and my hosting company is LeaseWeb.

This is my setting at LeaseWeb:

This is my DNS settings at GoDaddy:

This is how I send emails:

  MailMessage mail = new MailMessage();
mail.Subject = "Title Of Mail";
string Body = "Body Of Mail";
mail.Body = Body;
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.UseDefaultCredentials = true;
smtp.Host = "85.17.154.139";
smtp.Port = 25;
smtp.Send(mail);


I did not use any special SMTP settings:

## migrated from stackoverflow.comSep 4 '11 at 14:24

This question came from our site for professional and enthusiast programmers.

If there was a way to bypass spam filters, the spammers would abuse it.

What a commercial mailing list operator does, and which you cannot easily replicate, is build and maintain a reputation as a responsible and reputable source of bulk email. If you are not going to be getting into that, perhaps you could benefit from getting help from a commercial mailer. Professional mail is a big business, it seems unsettling if you have not been able to find a commercial provider. Are you trying to get away on the cheap, or doing something objectionable?

Abuse handling, bounce handling etc are important to get right, but until you have significant experience, your reputation is going to remain zero, if not negative (which is a reasonable starting point for unknown domains in this day and age). A lot of the reputation-based stuff like SPF, DKIM etc will help only if you have a reputation to defend. On the other hand, it does send the right signals to somebody who is deciding on whether or not a sender is to be treated as reputable (or rather, their absence is not a good sign; neither, in my book, is anything to suggest you are using homegrown and/or prerelease software to send email).

Having said that, if you really think you want to do it on your own, you should probably use a proper mailing list manager, rather than create your own software. This is an opportunity to migrate all your users to a proper mailing list infrastructure, where they can opt in to your mailings, or opt out, irrespective of their status on your site. This way, you can also divide your communications into separate lists for important operational announcements (say, one per three months maximum) vs. chatty and/or promotional mailings.

A proper mailing list manager can handle the nitty-gritty of processing bounce messages, combining messages to recipients in the same domain, putting in the proper headers, etc.

Check your announcement with a few volunteers before you start a big campaign. Maybe you have a few critical users on your site who can try to offer constructive input.

Take all complaints seriously, make sure all your addresses are confirmed users of your system. Start small, send to maybe 5 or 10 per cent, perhaps with a priority towards current active users, and stop immediately if you start getting more than stray complaints.

Monitor blacklists and take action if a popular list starts blocking you. There's a good number of online tools but the oldest is probably http://www.moensted.dk/spam

Major edit; revamped the reply to emphasize the use of ready-built solutions and commercial service providers. You really don't want to write your own mailer.

• actually i am willing to pay about 300 usd for 300k mails. I looked for several companies and asked them but none of them responded. They also need to have easily implementable api because i will use it at my c# application. I configured PTR and SPF correctly right now. Do i also need DKIM ? – MonsterMMORPG Sep 4 '11 at 12:01

Use a service like mailchimp.

http://mailchimp.com/features/email-delivery/

• Too expensive. i contacted several other companies none of them returned my email. – MonsterMMORPG Sep 4 '11 at 0:19

I used to work for a bulk mail sender and I created one of his mass mail sender.

As you pointed, is not a option to use a mail marketing provider, the answer to you question is build your own.

As I suppose, you will be sending email only from your domain, and not for any third party, it will be a lot more complicated.

• You MUST configure all the IPs which will be sending email to reserve resolve to your domain, contact your provider if you need help, the destination server will use it to trust your email or not.

• It will be better to get more than one IP addresses, we used to use 40 for 10M emails per day, and always check your emails and remove the blacklisted.

• Another very important setting is to change your emails to not send the same message repeatedly and always send fresh email (a good option is less than 6 hours from the creation of the message, as show in the mail header). You should change name of the user in the contents of the message, DKIM signature, etc. More differently is less chance to be flagged as spam.

• Bigger providers, like hotmail and yahoo have control panels to bulk email sender, use it to monitor your email quality

Probably are more things to do, these are some very important and the easiest to implement. Those are not trivial, and to ensure your email are not flagged as spam you MUST build a good reputation and follow these rules.

Have you tried Amazon Simple Email Services http://aws.amazon.com/ses/ it's definately a cost effective solution, although I'm not sure how easy it will be to send to 300k of recipeints.

If your email list is opt-in and that the quality of the addresses is OK, you can use a service like Mailjet. It will improve your deliverability, but it's much much cheaper than Mailchimp.

You will also get the analytics so you can see what actually happened to your emails.

(disclosure, I work for them: but simply check their prices & credentials, it's an awsome product !)

• hello. since you work for them i want to ask this. how easy to send emails with in C# application ? can you give documentation of C# link – MonsterMMORPG Sep 8 '11 at 20:49
• the email for "email confirmation" went straight to spam :/ I don't even bother register to this service. – Totty.js Jul 25 '13 at 20:38
• Not Mail Jet. 1 spam email and you are done. – user36419 Feb 24 '14 at 22:02
• That's exactly the right thing to expect from any serious operator. They will have Terms of Service (TOS) which spell this out in no uncertain phrasing when you sign up. – tripleee Sep 21 '16 at 13:37