Send email to maildrop directly?

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Send email to maildrop directly?

Post by alex.barylski »

I have potentially millions of emails which are sent (currently with postfix). Typically I have seen most PHP application implement some kind of scheduler in combination with cron. I'm wondering if this is at all nessecary, as postfix docs seem to suggest it's internal queue manager is capable of handling massive amounts of email.

What I am wondering...is it possible to use Swift to send (say using a CLI script) 100K+ emails to postfix (or whatever SMTP is installed) all in one go? Obviously this would not work under all MTA's but postfix docs, like I said, suggest it's capable of massive list management.

The alternative is to implement the throttling/scheduler in PHP which would require cron and likely be less efficient than just sending the emails directly to the server and letting it queue up the messages for sending/scheduling/throttling.

Postfix, so it seems, allows for some sophisticated throttling, scheduling, etc so I'd much rather delegate those duties rather than re-implement them in my application.

Do you have any opinions/experiences with the above?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: Send email to maildrop directly?

Post by s.dot »

It seems better to use a cron here. Why would you want to queue up that many emails on any server?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Send email to maildrop directly?

Post by alex.barylski »

To be honest I cannot answer with confidence, it's why I'm asking am email expert. ;)

Although on second thought this topic is outside the domain of SwiftMailer and more specific to Linux in general...

I guess whether I send all at once or using application based throttling depends on the underlying server. I am conviced thus far, that postfix sounds like the right tools for the job, based on it's modular design and partitioning of queues and I assume (haven't tried it yet) that it's capable of handling such a load.

Delagating this task to a binary will always result in faster execution than equivelant implement in PHP, plus it has the advantage of not re-inventing the wheel. Having to keep track of what domains have received X number of emails with X number of minutes to prevent flodding that server is tedious and boring, if I could just send an email and let postfix worry about that (through proper configuring) that saves me a lot of work. That is, if I'm understanding everything correctly. :P
Post Reply