Sending email in C # .net

I have the following code to send email:

System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient();
client.Send(myfrom@email.com, "myreceipient@email.com", "test", "test");

      

Now, since I am sending it from my own work PC, I have IIS 5.0 installed, and apparently most mail servers on the recipient side assume it might be spam coming from an ADSL IP. So I authenticate the code above using:

client.Credentials = new System.Net.NetworkCredential(myEmailHere, myPasswordHere);

      

But it still won't ship to some clients. Is there a way to get around this? Eventually this code will be hosted on a RackSpace server, how can I / could I configure it so that recipient servers don't think of it as spam?

+2


source to share


1 answer


Unless your email is flagged as spam, this is a huge and complex topic.

First, the best rule:

  • Sent from a static IP and not from one part of a recycled pool (e.g. from a DSL / Cable provider, virtual server host, etc.). Make sure the previous owner spammed it by sending test emails to your test accounts at hotmail, yahoo, gmail, etc.
  • Never send spam from this address (including anything that may be flagged by multiple people as spam, even if you don't think so)

If you're serious about sending a significant amount of legitimate emails and don't fall under the flag of spam, there is a lot to learn beyond what you can get from SO. Here are some resources to help you get started on this path:



Avoid Blacklist Blues

Avoid being blacklisted

How to avoid Blacklists

+5


source







All Articles