简体   繁体   中英

sending a lot of email in newsletter module

i am writing a newsletter module in php/mysql.

how can i send email to site subscriptors that doesn't cause my mail server get blocked ? i mean it doesn't treat as a spam sender?

The full answer to this question is really outside of the scope of this site, as much of it will involve administrative tasks with the domain and server(s) involved.

But the short answer is: Don't do this! You will just end up getting your server's IP blacklisted, making even low-volume e-mail sending worthless from that server.

You should look at other options; an RSS feed, a third-party, well-run mailing service (like Constant Contact), or something else.

使用Cron作业执行此操作并以小块发送具有时差的邮件。

There are several rules that you need to follow if you want to send out emails from your site and have then not being flagged as spam:

  1. Start with the most obvious: check to make sure IP address of your server is not on any spam black lists. Try this site: link text

  2. By default all emails sent from a website hosted on Apache server are send from the user Apache server runs under, usually 'nobody'. This is a red flag for spam filters, so you have to modify the value of 'return-path' header which is not always allowed by email server. If you can't modify return-path, then you need to start apache as another user, create a new account for your apache server, name it anything you like as long as it's not 'nobody' and then configure apache server to run as this new user

  3. Very important to have reverse DNS entry for the IP address you use for sending out emails. That reverse DNS entry must point to same domain name that points to this IP address. This is actually the most important thing to do. Since only a webhost can add reverse DNS entry, you should ask your host to do this for you.

Other smaller steps that can help is to configure an appropriate spf entry in your DNS server and another one is to use digital signature to sign all your outgoing messages. I used to use a program called dksign for this, it's probably not the most up-to date program now, so do your research and find the best way to sign your messages.

Use common sense when creating subject lines. If you say "free discount offer" in the subject line or something similar or "get viagra", your message will probably be flagged as spam no matter what.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM