开发者

aspx send mail as spam

app.config

 <system.net>
    <mailSettings>
      <smtp deliveryMethod="Network">
        <network defaultCredentials="false" host="smtp.gmail.com" password="aaa" port="587" userName="noreplay@aaa.si" />
      </smtp>
    </mailSettings>
  </s开发者_Python百科ystem.net>

C# code:

 MailMessage message = new MailMessage(email.From,
                                                      email.To,
                                                      email.Subject,
                                                      email.Body);

                message.IsBodyHtml = true;
                SmtpClient client = new SmtpClient();
                client.UseDefaultCredentials = false;
                client.EnableSsl = true;
                client.Send(message);

And mail is sent like spam. problem must be in Credentials but i do not know where. Can someone tell me what i must do that mail will not be send as spam?

Thx


You cant handle this on the code part solely as it depends also on the server that recieves it. I worked in an email marketing company before and here are some tips you can use to avoid spams

  1. The best way is to ask major ISP's/Email Providers to add your domain (where the email is sent from) on their whitelist.
  2. Prevent as much as possible using undesirable subject and messgaes indicating words that you see in Spam like "Discount", "Urgent", "Important", "Sale" and other terms meant to grab the attention.
  3. Text-to-image ratio is a must be high. All it means is if you have image in your email add a lot of text.
  4. Include contact information and an dont forget an unsubscribe link (this is the most important one)

Then to really be sure use a spam filter test application to test your message first before sending


See this link and this. Not solving your problem in terms of technical help but if you really need to send some kind of promotional offer to a large customer base, sending it from your own code is not a best option.

You better get a package from mass email service providers because there are quite a lot of rules (Raymund's post has mentioned some rules that I am talking about) that big shots (google, yahoo, hotmail) apply that will cause your emails to go into spam folder.


Well raymund does has some important points to consider, but what you should try to avoid sapm in asp.net, sending mails via sendmail class is that you should use BCC like mail.bcc.add("string or the mail id you want the mail to be sent, or a group from arrays what ever you want to pass here, must be mail id though");

This will protect the identity of all the recievers and every one would think that he/she has got a seperate email. so i guess this very much solves your problem.

The point made by raymund shoud also be considered specially getting your domain in the white list of big providers like yahoo,gmail,hotmail,live and all, because every time you can't purchase a software for sending bulk mails.

hope this helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜