[Catalyst] Sending Email from Page?
John M. Dlugosz
wxju46gefd at snkmail.com
Tue Mar 22 01:47:41 GMT 2011
On 3/21/2011 9:16 AM, Jorge Gonzalez jorge.gonzalez-at-daikon.es |Catalyst/Allow to home|
> I really don't see the point in using an Email model. Just use the email sending module
> from the controller (Mail::Builder::Simple or whatever) and setup a local postfix which
> accepts outbound emails from local connections, and you're done. All queuing will be
> done by postfix, where it belongs.
My feelings exactly.
> You need to install a local mail server so that the Catalyst app does not get stuck
> trying to send. We can assume that messages sent from localhost will be handed over to
> the local MTA pretty quickly (besides corner cases like full mailspool and the like).
> This MTA can be a full-blown one, or one configured to use use a smart host.
I have Postfix on that server already. I found it was easy to add a rule to accept
connections from the local machine (as well as the existing rule for accepting
authenticated connections) without adding another socket. I'm not expecting it to handle
a big load. But I think I understand the point: set up a server that doesn't have much to
do, and have it forward to the larger system. Rather than a separate queueing process,
Postfix _is_ such a queue process; just use another one of those.
> Catalyst offers you some posibilities, but it does not force you to use them. To me,
> using a model for sending email is like hammering a nail with a screw driver. You can
> surely do it, but it's simpler to use the hammer. Even if you have a fancy screw driver.
I might want to make it easy to change the email address the form directs to, without
having it in the Controller PM file. I'm sure I can add my own sections to the config
without having to make a class to receive them, right? I really need to understand the
Thanks for the tips.
More information about the Catalyst