Limit of QEmailServer

Login or register to post comments
6 replies [Last post]
profnotime's picture
Offline
Joined: 01/13/2009

I really wish to use this opportunity to express my gratitude to everyone here. You have all been great sources of inspiration to me all the way. Thanks so much

Now to my little question: What is the LIMIT of QEmailServer? I want to know how many addresses I can send an Email to at once. Also, I discovered that each time I try to send a message to about 30-50 users, it always execute beyond the 30seconds threshold limit in php.ini.

Any and every information you have on this will be highly appreciated.

Cheers!

Offline
Joined: 03/31/2008

The limit isn't with the class itself, but rather the external elements that are affected. Some sending mail servers simply won't accept large to lists, and as you already found, waiting for that many confirmations can cause the script to time out.

If you need to send it, and your server supports it, I'd just set the timeout higher. Perhaps to 0 if you're sure the script is safe.

profnotime's picture
Offline
Joined: 01/13/2009

Do I have to set this timeout in the ini file?

Offline
Joined: 03/31/2008

It depends on your server config. If apache allows it, set_time_limit() should also work.

alex94040's picture
Offline
Joined: 11/06/2008

I personally found that if I send more than a couple hundred emails at once, I just have to use an Email Relay service. GMail will block you after a couple hundred emails a day.

I use DNSExit.com, they're cheap and pretty reliable. And their DNS relay is perfectly compatible with QEmailServer.

profnotime's picture
Offline
Joined: 01/13/2009

Thanks Alex, I'm checking out DNSExit.com.
I'd appreciate if you give me a sample code on how you have been using them. I've clicked on mail outbound .... and I'm checking them out now!

alex94040's picture
Offline
Joined: 11/06/2008

QEmailServer::$SmtpServer = 'relay.dnsexit.com';
QEmailServer::$SmtpPort = 26;
QEmailServer::$AuthLogin = true;
QEmailServer::$SmtpUsername = "...";
QEmailServer::$SmtpPassword = "...";

$msg = new QEmailMessage();
$msg->From = ...;
$msg->Subject = ...;
$msg->To = ...;

set_error_handler("EmailSendHandler");
try {
QEmailServer::Send($msg);
} catch (Exception $ex) {
....
}
restore_error_handler();

function EmailSendHandler($__exc_errno, $__exc_errstr, $__exc_errfile, $__exc_errline) {
throw new Exception($__exc_errstr);
}