PHP邮件发送和黑名单[关闭]

I want to make an app with php, this app has a cron job and send mail daily.

Is there any possibility of falling to the Blacklist?(Domain)

PS: Mail only send people who confirmed app.

Sorry for my language i hope i explained it correctly.

Yes, your server (IP address) and/or domain name can become blacklisted for many reasons.

If you automatically send lots of emails (for example a forum summary "What postings are new today?"), chances are high that one day some providers will block your mails or put them into the "spam folder".

A few ideas on reasons for mails being blocked / treated as spam:

  • Sending lots of mails at once => Providers can recognize lots of very similar mails incoming in a short amount of time. That can be interpreted as a mass bulk mailing.
  • No correctly configured reverse DNS record for the IP address of the mail sending server
  • E-mail script and/or MTA not following standards / rules (for example wrong HELO, mistakes with the mail headers, ...)
  • Receivers of your mails (Customers) can click a "Treat this as spam" button. Many email providers offer such a button to allow their users to flag spam mails.
  • No "Unsubscribe" link in your mass mail. If your newsletters / notifications don't contain an "Unsubscribe" link (for example in the footer), provider-side filter software might award a negative rating.
  • Wrong SPF record. If your domain has an SPF record in the DNS, many providers will treat mails as spam if they don't originate from an allowed server (named in the SPF record).
  • Bad text to URL ratio. If your mass mails mainly contain links but not much text, filter software might declare it as link spam.
  • Scripts or other users on your webserver (shared hosting environment) really send spam (evil users or software vulnerabilities exploited by hackers). => The entire server IP or even the entire IP range of your provider can become blacklisted in DNSBLs.
  • Attachments featuring dangerous file formats (EXE, COM, PIF, SCR, ...) will cause mails to be blocked in many cases.
  • Keyword filters can block certain words like "Casino", names of certain pharmaceuticals, ...
  • Embedded JavaScript, VBScript, images from remote servers, flash or java applets, ... can negatively incluence your mail arrival rate.

One approach might be using a different server (different IP address) than the web app server for your mass mailings and/or marketing mails. If a provider blocks the mails from your mass mail server's IP address, at least the important mails from your app server (e.g. registration confirmation mails), won't be affected.

Sending huge amount of email will get you in trouble, no doubt.

Email marketing is no easy to handle, there are a lot of things to keep track of, you need multiple delivery servers in order to avoid blacklisting(and all these servers must be legit, don't fool around), all your email must be correctly formatted and you must follow the CAN-SPAM act, otherwise you are a spammer.

But that's not all, what happens with bounced emails? you can't just keep sending to invalid email addresses, have you even taken this into consideration?
How about giving the right to a user to unsubscribe from you without later marking you as a spammer ?

All these are steps that you need to take BEFORE you even send a single email and sometimes even if you follow best practices you will still get blacklisted, that's the way things work for now since the amount of spam is too damn high.

You might want to take a look at a solution like MailWizz EMA that has taken into consideration all the above (disclaimer, i am the author) or any other solution that deals with email marketing, since the people behind these applications know a thing or two about the way things work in the email industry.