Sending emails to multiple users with google mail... |
[eluser]Twisted1919[/eluser]
My hosting server has a limit of 500 emails per day . When i reach that limit , i can't send any mails anymore. So i tought , using google mail account would do the trick . One of my domains has mail server hosted by google at google apps so i went this way . As you know , google apps mail also has a limit of 500 emails per day on single account , so i created 3 accounts (testing for now ) so i can send 1500 mails [if i got it right] . Bellow is my code for sending mails from those accounts : Code: function index() Now , when i try to send the mails , sometimes it sends 200 or 300 once , but sometimes just 10 , then i get an error with debugger , or i get an internal server error . What can cause the problem ? Should i use sleep() for some seconds after x mails are sent ? How should i do to send all the emails through google mail ? Thanks!
[eluser]Dam1an[/eluser]
How many do you plan on sending a day? Or to give a more accurate idea, how many do you expect to send over the course of a month, cause if its not in the region of tens of thousands each day, you could probably just ask your provider to raise the limit... you'd be suprised how much a polite email/call can get you They are even more likely to agree if you send several times your daily limit, but only once a week
[eluser]Twisted1919[/eluser]
I only send emails to the new registered users and sometimes to all users sending some important news or updates . That is the problem , now i have 9829 registered users and i try to send an mass email to notify them of some changes on the site . This situation may appear few times in a mounth so the number of send mails will differ ...
[eluser]Dam1an[/eluser]
Well, with most types of mailing lists, there's no need to send them all simultaneously, but stagger it over a few days... Or, you could use some 3rd party service for mailing lists, and then just do the registration emails yourself
[eluser]Twisted1919[/eluser]
mailing lists ? i don't know to well this subject ... Can you point me to some site or give me an clean example ? Thx.
[eluser]Daniel Moore[/eluser]
If I recall correctly, the limit the hosting provider places on your email account is an SMTP relay limit. If you use a method other than SMTP, like PHP's built-in mail() function, wouldn't this bypass that restriction? I have a limit of 250 per day, but have successfully sent out 1500 in one day using mail().
[eluser]Dam1an[/eluser]
PHP List is the most used mailing list manager in PHP, but its a self hosted solution. Basically a mailing list system lets you store a list of email address to send your newsletters/notices/whatever to, and takes care of sending them (they also have a lot of extra functionality, but thats it at the most basic level) If you can find a web host which doesn't limit the number of emails/day you can send, or has a high enough cap, you could just run PHP List from there (I'm sure you could then hook into it remotely from CI if need be) or use it stand alone
[eluser]Twisted1919[/eluser]
[quote author="Daniel Moore" date="1240515843"]If I recall correctly, the limit the hosting provider places on your email account is an SMTP relay limit. If you use a method other than SMTP, like PHP's built-in mail() function, wouldn't this bypass that restriction? I have a limit of 250 per day, but have successfully sent out 1500 in one day using mail().[/quote] I can use just smtp auth , and that's all i get ... I can't move my site from there because the hosting is very very good and fast . Quote:PHP List is the most used mailing list manager in PHP, but its a self hosted solution. Hmm ... i doubt that this can help me . The last solution is renting a dedicated mail server but it doesn't worth ... I'm out of ideas over here
[eluser]Twisted1919[/eluser]
Even if i didn't find an valid solution for my problem , i noticed a thing regarding the email class and public smtp servers When trying to send HTML mail like this : Code: $message = 'HTML CONTENT '; I got the following error : Code: 220 mail.server.info ESMTP So the quick fix is to add to config array following values : Code: $config = Array( This way , the html mail is sent . Hope it helps |
Welcome Guest, Not a member yet? Register Sign In |