4

I have a website that every morning sends a newsletter.
But it's not a regular newsletter, every email has different content depending on the user account.

Now I use a class called PHPMailer and it work pretty well, it does what I need. But to do that, i authenticate with a Gmail account. Problem is, Gmail, just like any other email service, has its send-daily-limits.
In facts, it just sends the first 2000 emails.

How can I overcome this problem? My service is free and I don't have money to pay any extra service, I only have my (dedicated) server.
(ubuntu 12.04, lamp stack)

Thanks in advance, and sorry for my awful english.

  • If the mail content it's the same for all , try to send to you the email and put people into BCC – Fky Sep 09 '15 at 09:08
  • If you need send more than 2000 emails a day you need a commercial solution like Mail Chimp or similar. If you have such a massive audience for your free service, you can probably get your users to pay for it via donations or similar. – laurent Sep 09 '15 at 09:14
  • No, you can't send unlimited emails using PHP or anything else -- all mail services have limits. Gmail is actually being pretty generous with 2000/day. There are a bunch of paid services you can use if you need more. Some of them are pretty cheap (pennies a day for thousands of emails), but you can't get it for free. If you're not sending that many every day, you could solve the problem by splitting the batch up across multiple days. – Simba Sep 09 '15 at 09:17
  • 1
    @YuriBlanc, per favore scrivivi in inglese, grazie -- _@YuriBlanc, please write in english, thanks_: http://meta.stackexchange.com/questions/118678/how-should-we-handle-wholly-non-english-comments ;) – Cliff Burton Sep 09 '15 at 09:18
  • 2
    You have a dedicated server so install your own mail server –  Sep 09 '15 at 09:19
  • @CliffBurton sorry i replied this question in english ty. – Yuri Blanc Sep 09 '15 at 09:19
  • @Dagon, if he sends that many emails his server ip will most likely end up being blacklisted, and he might be banned by his server provider. Better pay for a dedicated service, which usually knows how not to be blacklisted. – laurent Sep 09 '15 at 09:23
  • We send many more yhan that. If you do it properly there will be no problem –  Sep 09 '15 at 09:25
  • The content is different in every email, it's based on the user – Federico Magnani Sep 09 '15 at 09:25

3 Answers3

6

If you run your own server and send legitimate emails, there is no practical limit to how many emails you can send. You're not paying per-message fees, and almost all spam filtering is now done by what the users do with their messages - so if they act like you're sending stuff they want (i.e. they read it and don't mark it as spam), you will have no deliverabilty issues.

There's nothing to say that a server sending high volumes of email will necessarily get blacklisted, though it is often regarded as suspicious if a new server suddenly starts sending lots of messages, so it's a good idea to ramp it up slowly, and/or spread your sending across multiple IPs.

I have self-built sites that send high volumes using PHPMailer - sometimes millions per day each - but you may have trouble configuring an off-the-shelf server to do that. PHP is quite capable of sending several hundred messages per second, mostly depending on your templating system.

You do have to be completely paranoid about your config though:

  • Set up strict SPF
  • Sign with DKIM
  • Configure DMARC
  • You can't use BCC for personalised messages
  • Don't send attachments
  • Keep messages small, link to bigger content
  • Make sure your mail server DNS records resolve both ways
  • Make sure you have good bounce handling (difficult in PHP)
  • Use VERP addressing (helps bounce handling)
  • Monitor your mail server queues
  • Deal with any unsubscribes, spam reports or blacklisting immediately
  • Always, always use double-opt-in for new subscriptions
  • Never use bought-in lists

All this stuff is essentially what you're paying for when you use an ESP, and though they will often try to tell you otherwise, there's nothing stopping you from doing it all yourself - as the saying goes, it's free so long as your time has no value!

As others have mentioned, RSS or notifications may allow you to reduce the amount you need to send via email.

Synchro
  • 35,538
  • 15
  • 81
  • 104
  • send few thosand a day and do less than half of theses, its real overfill here –  Sep 09 '15 at 20:11
0

You can create a script that limits the amount of email sent in a given period of time. For example 20 emails each minute are equals to 1200 email sent in an hour and stay below your service limits. (most shared server also limits email per hour). In this case the "script" should run with a browser page kept open since it send new request at a given time. (look for example at acymailing extension for Joomla Cms)

Another option is cronjobs. How to send emails via cron job usng PHP mysql

Community
  • 1
  • 1
Yuri Blanc
  • 636
  • 10
  • 24
  • I already use cronjob to call the script that sends the emails, but my is a "daily mail" that basically tells the user its tv episode for the day, so it needs to be in the morning to every user – Federico Magnani Sep 09 '15 at 09:28
  • I understand. i think the most suitable way is going for a commercial service because in that case you need (for example) to send say 4000 different emails @ mornign. I cannot see a pratical solution. By the way, why not notify your user with different technologies like a RSS feed and/or a mobile app? – Yuri Blanc Sep 09 '15 at 09:30
  • Problem is, my service is free, and i don't have money to pay a commercial service (or to create an app). I now send 3000 email every morning, and this number is growing. – Federico Magnani Sep 09 '15 at 09:35
  • use other comunication mechanism like RSS feeds. you can make a user specific feed. The user just go to the webpage too read and is simple to use in a mobile app if you may need to. – Yuri Blanc Sep 09 '15 at 09:36
  • But almost nobody uses a RSS feed of my user. Everybody just wants to stay notified, and the emails are (almost) the only way to do this without spending so much – Federico Magnani Sep 09 '15 at 09:43
0

Configure your server as a mail server so you can send as many mails as you need, without relying on external servers.

gontrollez
  • 6,372
  • 2
  • 28
  • 36
  • If you send too much your service provider maybe will doesn't accept this beheaviour also in a dedicated server, and also you risk to get blacklisted. (i'm not a sistem admin so don't care too much) – Yuri Blanc Sep 09 '15 at 09:33
  • There are published guidelines about how to prevent being blacklisted. You must implement SPF, and the mails must adhere to some rules. – gontrollez Sep 09 '15 at 09:36
  • 1
    @yuri with a dedicated server you don't have to answer to any one –  Sep 09 '15 at 09:43
  • @Dagon yes you do - while you may have control of your server, you can still be blacklisted or have deliverability issues, so you need to be paranoid about your config. – Synchro Sep 09 '15 at 11:25
  • @Synchro don't disagree with that, i was referring to the comment about the 'service provider' which does not exist for a dedicated machine –  Sep 09 '15 at 20:10