Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
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.
Related
I'm pretty confused on this topic so sorry for mistakes but I'll try to be as cleaner as possible.
Basically we have a mail marketing software that allow users to send campaigns via phpmail/phpmailer of our hosting/server as sending servers or connect to third parties services like Mailgun, Sendingrid etc via API.
We are talking of 1-5K mails per submission and most of them are long time subscribers, nothing exceptional.
Currently we have users that have verified their sending domains trough the software and use phpmail/own vps as sending domains while others decided to use eg Mailgun. But in the latter case they don't verify their sending domains.
How really those services impact delivery n technical terms without domains verification?
Basically they have as verified account only our agency domain while users send with their domains.
TLDR: Phpmailer/own vps+verified sending domains perform better or worse than mailgun/top delivery services without domains verification in terms of deliverability?
This is really too broad a question for SO, and the answer to almost all of it is "it depends".
Spam filtering and deliverability is driven by recipient actions at most major ISPs (apart from gmail, which seems to use a random number generator). If your recipients make a point of reading and responding to your messages, they will go into the inbox no matter what you're saying and how you send them. If you have a long history of doing this, so much the better. The problem is that this is a very difficult point to get to, and building up that reputation without taking measures like authentication via SPF and DKIM, double opt-in, obvious unsubscribe mechanisms, relevant content, reverse DNS matching, DMARC, etc. Those things can be painful to set up, and external ESPs can make it easier - there's no reason why you can't get mailgun to do proper authentication, and anyone sending that way should definitely take advantage of that, otherwise they're just throwing away opportunities.
This question already has answers here:
How to send 100,000 emails weekly? [closed]
(3 answers)
Closed 9 years ago.
I have a custom CMS for my customers. That's because most of my clients are in a specific market (film industry) and need very specific tools.
But they also need to send newsletters. I did create some basic WYSIWYG HTML editor and managed to create a send out script with PHPMailer.
Everyone else seams to use MailChimp. Why? What are the reasons to use mail chimp over a custom made script?
How does it affect reader's compatibility (and does it?)
How does it affect spam blocking?
I've always thought sending e-mails through the original server was the way to go to avoid having a senders' mail not having the same reverse domain name.
Wouldn't it be better to simply create a clean inline css and send it out by connecting to the local SMTP server? No cost, no mail chimp monkey ad, etc.
Edit: This is not for the purposes of sending spam and most of my customers only have lists between 100 and 1500 recipients, they are all professional mails (film making industry). It is not about how to send 100K e-mails.
Strictly speaking there is no reason you can't do what Mailchimp (and others) are offering. However they do tend to make it a lot easier to work with.
They all have their different approaches, but they tend to speed up development of complicated mail campaigns and allow them to be managed better. This is particularly true of HTML emails, which can be an absolute time sink to get right on all browser & mail client combinations. (Gmail on IE8-11, Mail app on iOs, Outlook on Mac... etc. etc.)
I'm speaking specifically of Mailchimp here, but this should apply to many others:
Templates. They provide HTML email templates to get your designs started. This can avoid a lot of subtle errors in HTML mails.
Device preview. They provide a preview service to display your mail on a large number of devices & mail clients. So you don't have to go through them all yourself.
Opt out service built in. In Europe at least all marketing emails must have a link to unsubscribe from the mailing list. It's a legal requirement that can bite you and they handle this neatly. The link is always embedded and you can't accidentally re-add someone when you create another list.
Scale. They are built to sent lots and lots of mail. This can reduce the load on your servers and keep them from falling over. It can be particularly useful to make sure mail gets delivered quickly and doesn't sit around in a mail-queue.
Management. You can set up the campaign (as a developer) and hand over to the marketer(/someone else) to manage the campaign. => More time on SO for you!
Spam. They may come with an anti spam tool to check your mail before it's sent out. Not foolproof, but handy before you spend your money on a campaign.
This may sound like an endorsement for Mailchimp, but any of these kinds of services will do much the same. There are many of them so shop around and find the best fit for you. My main point here is don't re-invent the wheel. Emails may seem simple, but can get complicated fast.
this is my first question on StackOverflow, but I think that we'll both come to the happy end. :) The problem is: I've got newsletter script written in PHP and when I send those emails to the various accounts they are put in the spam folder. Here is what I get in mail headers:
X-Spam-status: Yes, score=5.01 tagged_above=1 required=4.5
tests=[HTML_FONT_SIZE_LARGE=0.001, HTML_MESSAGE=0.001,
HTML_TAG_BALANCE_BODY=0.712, MIME_HTML_ONLY=1.105, MISSING_DATE=1.396,
MISSING_MID=0.14, RCVD_IN_BRBL_LASTEXT=1.644,TO_EQ_FM_DOM_HTML_ONLY=0.001,
T_FRT_CONTACT=0.01] autolearn=no
And here are my questions:
What is that and how to fix status RCVD_IN_BRBL_LASTEXT? I haven't found anything informative googling that phrase.
How to fix MISSING_DATE status? I've put in the code generating whole email:
$mailHeaders[] = "Date: ".date('Y-m-d H:i:s', time());
but with no success. "Date" fields comes only as H:i (13:45, for example) - Thunderbird 3.1.3 FYI. Searching on SO didn't help me. I have also tried adding Delivery-Date status - still nothing.
RCVD_IN_BRBL_LASTEXT indicates that your email has been flagged by the Baracuda RBL, which is a service which tracks IP addresses that have been known to send spam.
Possibly your newsletter has been flagged up as spam in the past? or possibly its the ISP you're using to route your email which has been responsible for some spam. Either way, this particular point isn't an issue with your mail headers.
The missing date is the important one which will bring your points below the threshold.
The date format you need looks like this: Date: Wed, 15 SEP 2010 14:12:27 +0100
Most of that is self explanatory (the last bit is the time zone), and it looks like you know your way around the PHP date function, so hopefully that should sort you out. But I found this page helpful as a walk-through of a legitimate email header format.
The challenge with bulk email sending is that there's so many different factors that could throw you off and get you blocked as spam. Headers tell you what's going on, but in the grand scheme of things they're not one of the biggest challenges.
My company sends 50000+ emails per week, sometimes that many per day. Here's what we've learned:
1) If your server hasn't established "reputation" with email hosts, you're more likely to get flagged. There's no great way to establish it, though sites like Socket Labs simply throttle down new clients in the beginning and after 60-90 days release that throttle to allow more email to go through. As many emails as Socket Labs processes, it tells me it's a valid practice.
1a) Monitor the RBL list to ensure you're not on it. If you do get flagged (happens to just about everyone at some time or another) aggressively work to get yourself off ASAP. Contact the RBL in question and work with them to quickly right the situation.
2) The "big guys" including Gmail, Yahoo, AOL, and MSN are sensitive to being rapidly hit by the same host in succession. My company has chosen to overcome this by keeping track of who our email processes are sending to via a "log" If the next email has the same domain as the previous sent, we wait a period of time. If not, we fire at will. It prevents our system from sending more than 1 email per X seconds to the same host, and has meant our emails are getting through at a very high rate.
3) AOL mail is borderline worthless. I saw a stat once that someone had proven something like 20% of email sent to AOL just "disappears" I'm not sure if it's that high, but I know we have nothing but problems with getting AOL email through...it's the nature of the beast. The good news is that AOL is on its way out, so we shouldn't have to deal with it on this level too much longer.
4) The obvious step is to ensure that you're doing the best you can to stay CAN-Spam compliant. Include a real-time opt-out, company information in the footer, and don't try to deceive with your message.
5) Finally, don't send email to people who haven't requested it. It seems like a silly easy step, but it's abused SO much. You won't be flagged as spam if you send to people who want your email...it's that easy. If you get a bounce, process it out of your list immediately so that you're not trying to resend to a bad account.
Good luck.
The X-Spam-Status header is being added by a Barracuda spam filter, and what you're seeing is diagnostic information it attaches to explain why it marked the message as spam.
Barracuda is a rules-based engine, and as you guessed, the score you're getting (5.01 in the example above, though you say you fixed the date so your score may be lower) is above the allowed threshold.
Since the highest-weighted signal is the RCVD_IN_BRBL_LASTEXT field, you're likely getting dinged primarily because your IP address is in their Real-time Block List (RBL). It's possible you can find the data source that hates your IP -- check http://www.spamhaus.org/lookup.lasso to see if it's Spamhaus that has tagged you -- and convince them to remove you, but more likely the best path is to use an IP that's already been groomed to have a good reputation. Two providers you may wish to check out are http://sendgrid.com and http://authsmtp.com, both of whom will allow you to proxy your traffic through their servers (assuming your content isn't likely to be voted as spam).
Hope that is helpful.
I work for a small marketing company that has asked me to develop a PHP application to send emails for their company without getting blacklisted or emails showing up as spam. I have a fairly good understanding of PHP (OOP) but I do not understand how to build this program. They need approximately 500,000 to 1,000,000 emails sent per month. They are ready to buy ip addresses, SMTP servers etc but I need to code the program to work. So basically what I'm asking is what is the breakdown of the different parts of an application like this needs and how it can function without being blacklisted or considered spam. I apologize if i confused anyone on this topic, its just that i used the mail() function numerous times and many of the mail keeps going to spam. This is a legitimate pharmaceutical company as far as i know, they just contacted me and asked me if i could do this so thats why im here to see if it is possible or not.
I know there are companies out there that can do this but they charge from $500 upwards and we cannot afford this. If there are specific equipment that needs to be bought we are ready to buy it to offset long term costs.
Any help is appreciated, thank you!
You're company is willing to buy hardware, but not pay $500 to have a company do it? For doing large mailings, you can use SwiftMailer. It has certain features to support bulk mailings and is written in PHP.
However, not getting blacklisted or put in the spam folder has nothing to do with hardware or software. You need a valid domain and valid emails. Put "V1agra" in an email an it probably won't get received by anyone, not matter what you are using.
The best way to be not be considered as spam and not being blacklisted is to send legitimate emails.
There is no problem sending a lot of mails from the same IP if no recipient mark it as "spam" at the end. To achieve this, a lot of things have to be taken into consideration:
Having good lists with opt-in is not an option.
Track bounces (both soft and hard), so you don't send unnecessary emails (don't send again emails to hard bounces, try again sometimes for the soft bounces and remove them if successful).
Run spam tests before sending bulk (SpamAssasin, etc.) (no advertising, but Litmus does that)
In fact, if you do everything good, your IP can end up with a good sending reputation and more mails will get to the inbox. Also be aware that when sending bulk, not everybody gets the email at the end. Some of them are "lost" by different filters in the middle of the process.
If you never sent mail from an IP, try to be progressive and do not send 1 millions the same month. I advice you to be progressive on how many mail send 1 IP.
Look at what specialized companies do. For example, you can learn a lot from Campaign Monitor and MailChimp. They have really great blog and resources to look at. Follow their blog, keep informed.
A company I work with has had success using an Open Source (LGLP license) project called PHPMailer for a similar function -- maybe this would be a good start for you?
EDIT: PHPMailer is great software but I spoke too quickly. I meant to say phplist.
If you are sending legit emails you should look into SPF.
Only validates an IP as valid sender of emails from a certain domain. Does not validate content or ensure safe passage through spamfilters.
But since spam is illegal in many countries, this validation means they know who to sue/fine.
well, you may simply use mail() but no amount of PHP is going to help you get past spam filters. They use blacklists, statistical filters, human-filters, neural networks and all kinds of technologies to determine if someone is sending spam.
1.000.000 emails per month sounds like spam to me, so most likely you'll be tagged as "spammer" :)
This question already has answers here:
Closed 13 years ago.
Possible Duplicate:
Avoid being blocked by web mail companies for mass/bulk emailing ?
Hi all,
if I send many emails per day (100s or 1000s) to users, style "someone commented on your picture" etc..., what are the best practices to avoid that these emails are labeled spam and blocked? I already have an opt-in (ie. users check a checkbox when signing up to get emails, and confirm their email.)
I'm looking for tips on email headers, and other ways to avoid being labeled as spam - from the basics to advanced techniques. Thanks!!
In terms of tracking how successful your anti-spam measures are, you will not have a great deal of luck with this unfortunately as a lot of spam filtering software simply drops mail that it believes to be bad. However, well-behaved anti-spam systems will reject (at SMTP time) the mail: so, you could capture the rejections if you have a valid return-path for your outgoing mail. Make sure the Sender: header is set to an address of yours which will receive mail so that the bounces end up there.
Some of the big ISPs support providing sites with copies of mail they have identified as spam ("feedback loops"). E.g. AOL does, see http://postmaster.aol.com/fbl/fblinfo.html . This would mean you would receive a sanitized copy of mail that they had received from you and had been marked as spam.
You will find some users are very lazy and rather than follow even very clear or easy unsubscribe instructions, will just click "spam". Even if they opted in explicitly in the first place. Feedback loops can help you identify those users although it's not trivial because the loops are sanitized precicely to stop you identifying the users!
Finally keep an eye on popular RBL lists to ensure your mail servers are not listed. Some of the popular ones are listed at the wikipedia page "Comparison_of_DNS_blacklists" (no direct link, sorry, only one URL per answer for me!)