email sending

13 views
Skip to first unread message

Joshua Paine

unread,
Apr 18, 2009, 9:57:43 AM4/18/09
to recess-f...@googlegroups.com
Anyone have one of the good mail libraries (html/text, attachments,
smtp/php, etc.) already convenient-ified for Recess?

--
Joshua Paine
LetterBlock: Web applications built with joy
http://letterblock.com/
301-576-1920

KevBurnsJr

unread,
Apr 18, 2009, 10:16:34 AM4/18/09
to Recess PHP Framework
Can't say i do

darkredz

unread,
May 19, 2009, 1:22:12 PM5/19/09
to Recess PHP Framework
might be cool to integrate with this PHP library

http://docs.spoon-library.be/email/

midnightmonster

unread,
May 19, 2009, 3:06:33 PM5/19/09
to Recess PHP Framework
Hadn't heard of 'spoon' before. I've been impressed with the quality
of the Zend Framework components, so I wrote a conversion script and
manually tweaked one ZF file, and now I have a copy of the whole Zend
Framework that uses Recess' class loading system. It works for
everything I've tried so far.

Zend_Mail is lovely and works just fine.

thebeline

unread,
May 30, 2009, 2:00:58 PM5/30/09
to Recess PHP Framework
I am using PHPmailer (http://phpmailer.codeworxtech.com/) for sending
confirmation emails and the last php snippet at http://www.linuxjournal.com/article/9585
to validate the addresses before the email is sent with a fair amount
of success. I have the three primary PHPmailer files in their own
apps directory, and call it by placing:

Library::import('mail.models.PHPMailer');

in the head of the controller that will be using it and calling it
according to the documentation. Works like a charm.

thebeline

unread,
May 30, 2009, 2:09:09 PM5/30/09
to Recess PHP Framework
Spoon looks interesting...

Tell me, can it automatically include images in email files by just
being pointed to a HTML file? Or does one need to import the images
manually?

It is a shame it doesn't support PDF as well... I am looking for a
good PHP library that can convert HTML to PDF and emails, OR take a
single template to convert to HTML/PDF/Email... That would make my
LIFE...

Francisco Lopes

unread,
Jun 13, 2009, 2:25:36 AM6/13/09
to Recess PHP Framework
While we are on the topic (even though the topic is a little bit old),
how do you guys manage to bypass the Apache/PHP timeout while sending
large amounts of emails?

From all these libraries I've seen, none of them have a built-in
solution. Currently I'm using PEAR Mail_Queue package, but I'm not
really satisfied with it. I'd be quite happy if you know any other
solution than writing my own. :)

Francisco

Kris Jordan

unread,
Jun 14, 2009, 1:32:41 PM6/14/09
to recess-f...@googlegroups.com
Francisco,

You're likely going to always run into timeout issues with large quantities of mail. Your best bet is to try and use a long-running PHP process that works through a queue of e-mail. A common way of doing this is to have your long-running PHP script emit a PID file when it starts up. Then have a cron job check for the existence of the PID file and the status of that process. If either doesn't exist it starts the long-running script. 

The script itself should probably keep track of its memory consumption and kill itself when memory is growing beyond a certain bounds -- or the script has run for some lengthy period of time.

This is the gist of how the folks at Flickr do their long-running queue processing in PHP.

-Kris

Jamie Rumbelow

unread,
Jun 14, 2009, 3:01:59 PM6/14/09
to recess-f...@googlegroups.com
There are plenty of great message queues free on the net, some written in Ruby, others C. They all handle multiple clients, message stacking, memory management etc. The one I use is called Stompserver, and it's written in Ruby so it's easy to run and configure. Check it out at http://stompserver.rubyforge.org/.

Jamie
Reply all
Reply to author
Forward
0 new messages