Sending mail to many recipients issue.

This is a discussion on Sending mail to many recipients issue. within the PHP Language forums, part of the PHP Programming Forums category; Hi am using phpmailer to send newsletters about 100. My server has a limit of 50. How can i recode ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-09-2008
undbund
 
Posts: n/a
Default Sending mail to many recipients issue.

Hi am using phpmailer to send newsletters about 100. My server has a
limit of 50. How can i recode the sending part of phpmailer so that
server does not detect this limit and so I will be able to send all
100 newsletters. Can you please point me to some tutorials or
examples.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 04-09-2008
Captain Paralytic
 
Posts: n/a
Default Re: Sending mail to many recipients issue.

On 9 Apr, 11:28, undbund <undb...@gmail.com> wrote:
> Hi am using phpmailer to send newsletters about 100. My server has a
> limit of 50. How can i recode the sending part of phpmailer so that
> server does not detect this limit and so I will be able to send all
> 100 newsletters. Can you please point me to some tutorials or
> examples.
>
> Thanks.


Subscribe to a bulk email SMTP gateway. E.G. http://www.authsmtp.com/
Reply With Quote
  #3 (permalink)  
Old 04-09-2008
Jerry Stuckle
 
Posts: n/a
Default Re: Sending mail to many recipients issue.

undbund wrote:
> Hi am using phpmailer to send newsletters about 100. My server has a
> limit of 50. How can i recode the sending part of phpmailer so that
> server does not detect this limit and so I will be able to send all
> 100 newsletters. Can you please point me to some tutorials or
> examples.
>
> Thanks.
>


If your server admin is at all competent, you can't. That would defeat
the entire purpose of having a limit.

Either send them out a few at a time (perhaps triggering with a cron
job), subscribe to a bulk mailer as Paul suggested, or change hosting
companies.

Be forewarned, however, if you change to another shared host and they
don't have a limit on emails, you may find your ip address on the spam
blacklists.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #4 (permalink)  
Old 04-09-2008
Twayne
 
Posts: n/a
Default Re: Sending mail to many recipients issue.

> Hi am using phpmailer to send newsletters about 100. My server has a
> limit of 50. How can i recode the sending part of phpmailer so that
> server does not detect this limit and so I will be able to send all
> 100 newsletters. Can you please point me to some tutorials or
> examples.
>
> Thanks.


Check your ISP policy for daily/monthly limits on e-mails. Assuming
it's over 100, then break the Send up into 3 different Sends, 1/3 of the
total at a time (to allow for some growth). If necessary, send them over
two or three days to minimize the counts.

If that won't work find an ISP that will let you do what you want. But
be aware that if I get one of them unsolicited, they'll be reported as
spam. More importantly, if this is a legitimate newsletter list with
cofirmed optins, all that, such an ISP will likely be on many block
lists, probably blacklists too so you'll be blocked/not blocked/blocked
.... and so on. Unless you pay for a static IP and can get a clean one
not already on any lists.

You can't legally "recode" to get around the ISP's limitations. And if
you do it illegally, you've opened yourself up to theft of services,
something many are starting to prosecute these days.

If you aren't up on these things, have a read here:
http://www.mail-abuse.com/enduserinfo.html
Start about 2/3 down the opening page. That's what used to be called
MAPS.

--
Regards,

Twayne

Open Office isn't just for wimps anymore;
OOo is a GREAT MS Office replacement
www.openoffice.org



Reply With Quote
  #5 (permalink)  
Old 04-09-2008
undbund
 
Posts: n/a
Default Re: Sending mail to many recipients issue.

On Apr 10, 4:24 am, "Twayne" <nob...@devnull.spamcop.net> wrote:
> > Hi am using phpmailer to send newsletters about 100. My server has a
> > limit of 50. How can i recode the sending part of phpmailer so that
> > server does not detect this limit and so I will be able to send all
> > 100 newsletters. Can you please point me to some tutorials or
> > examples.

>
> > Thanks.

>
> Check your ISP policy for daily/monthly limits on e-mails. Assuming
> it's over 100, then break the Send up into 3 different Sends, 1/3 of the
> total at a time (to allow for some growth). If necessary, send them over
> two or three days to minimize the counts.
>
> If that won't work find an ISP that will let you do what you want. But
> be aware that if I get one of them unsolicited, they'll be reported as
> spam. More importantly, if this is a legitimate newsletter list with
> cofirmed optins, all that, such an ISP will likely be on many block
> lists, probably blacklists too so you'll be blocked/not blocked/blocked
> ... and so on. Unless you pay for a static IP and can get a clean one
> not already on any lists.
>
> You can't legally "recode" to get around the ISP's limitations. And if
> you do it illegally, you've opened yourself up to theft of services,
> something many are starting to prosecute these days.
>
> If you aren't up on these things, have a read here:http://www.mail-abuse.com/enduserinfo.html
> Start about 2/3 down the opening page. That's what used to be called
> MAPS.
>
> --
> Regards,
>
> Twayne
>
> Open Office isn't just for wimps anymore;
> OOo is a GREAT MS Office replacementwww.openoffice.org


Hi Guys thanks for your help, I had sent a support ticket to my mail
provider asking them about the limits. They were kind enough to
provide me with that information. So that leaves me with this final
question. If I have the following PHP code:

for($i=0;$i<count($email); $i++)
{
sendMail($i);
sleep(5);
}

To my understanding, this pseudocode sends one email, waits for 5
seconds and send another email.

Am I correct?.

Thanks
Reply With Quote
  #6 (permalink)  
Old 04-09-2008
Jerry Stuckle
 
Posts: n/a
Default Re: Sending mail to many recipients issue.

undbund wrote:
> On Apr 10, 4:24 am, "Twayne" <nob...@devnull.spamcop.net> wrote:
>>> Hi am using phpmailer to send newsletters about 100. My server has a
>>> limit of 50. How can i recode the sending part of phpmailer so that
>>> server does not detect this limit and so I will be able to send all
>>> 100 newsletters. Can you please point me to some tutorials or
>>> examples.
>>> Thanks.

>> Check your ISP policy for daily/monthly limits on e-mails. Assuming
>> it's over 100, then break the Send up into 3 different Sends, 1/3 of the
>> total at a time (to allow for some growth). If necessary, send them over
>> two or three days to minimize the counts.
>>
>> If that won't work find an ISP that will let you do what you want. But
>> be aware that if I get one of them unsolicited, they'll be reported as
>> spam. More importantly, if this is a legitimate newsletter list with
>> cofirmed optins, all that, such an ISP will likely be on many block
>> lists, probably blacklists too so you'll be blocked/not blocked/blocked
>> ... and so on. Unless you pay for a static IP and can get a clean one
>> not already on any lists.
>>
>> You can't legally "recode" to get around the ISP's limitations. And if
>> you do it illegally, you've opened yourself up to theft of services,
>> something many are starting to prosecute these days.
>>
>> If you aren't up on these things, have a read here:http://www.mail-abuse.com/enduserinfo.html
>> Start about 2/3 down the opening page. That's what used to be called
>> MAPS.
>>
>> --
>> Regards,
>>
>> Twayne
>>
>> Open Office isn't just for wimps anymore;
>> OOo is a GREAT MS Office replacementwww.openoffice.org

>
> Hi Guys thanks for your help, I had sent a support ticket to my mail
> provider asking them about the limits. They were kind enough to
> provide me with that information. So that leaves me with this final
> question. If I have the following PHP code:
>
> for($i=0;$i<count($email); $i++)
> {
> sendMail($i);
> sleep(5);
> }
>
> To my understanding, this pseudocode sends one email, waits for 5
> seconds and send another email.
>
> Am I correct?.
>
> Thanks
>


Yes, but you're probably going to run into time restrictions. Your host
can set the maximum time a script is allowed to run; normally is is
around 30 seconds.

Even if the PHP script doesn't time out, your browser will.

A better way to handle it would be to store the info in a database then
kick off a batch job to send the mail. You may be able to send all of
them within your maximum time (IIRC, sleep() doesn't count against
script execution time). Of not, send a few (deleting from the database
as you go) and before exiting start a new copy of itself.

This way you can space them every 5 seconds or every 5 minutes,
depending on what you want.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #7 (permalink)  
Old 04-11-2008
Manuel Lemos
 
Posts: n/a
Default Re: Sending mail to many recipients issue.

Hello,

on 04/09/2008 08:28 AM undbund said the following:
> Hi am using phpmailer to send newsletters about 100. My server has a
> limit of 50. How can i recode the sending part of phpmailer so that
> server does not detect this limit and so I will be able to send all
> 100 newsletters. Can you please point me to some tutorials or
> examples.


There are some tricks but your ISP may still bust you.

Alternatively, you may want to relay your messages for instance in
gmail, if you do not mind that the sender address always appears with
your gmail address account.

You can relay the messages via SMTP but you need to authenticate within
a SSL connection. You can use that using these classes together:

This for composing and sending the message:
http://www.phpclasses.org/mimemessage

This for sending the message via SMTP:
http://www.phpclasses.org/smtpclass

This for authenticating:
http://www.phpclasses.org/sasl

The test_smtp_message.php example script in the first package
demonstrates how to send a message via Gmail.

--

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:52 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0