[Catalyst] Sending Email from Page?
John M. Dlugosz
wxju46gefd at snkmail.com
Tue Mar 22 01:53:41 GMT 2011
On 3/21/2011 11:45 AM, Kutbuddin Doctor ksdoctor-at-sanfordburnham.org |Catalyst/Allow to
> Can someone post instructions for using postfix withing catalyst?
> I have been seeing several (earlier) posts recommending Email::Sender.
> I see instructions in Email::Sender for SMTP and sendmail, but no config options for
> postfix. I was only able to find Postfix mentioned in unrelated Perl modules
> So if you have a local postfix running, how do you send an email to that service from
> within catalyst? I'm hoping the example will show how to setup connections to server in
> MyApp.pm and use it throughout the catalyst application.
Nothing to it: I just used the NMTP option in Sender or whatever fancier module defers to
it (I'm usig Mail::Builder::Simple). I think the default 'sendmail' would just call it,
too. If some mail server is running locally and listening to the usual ports, it should work!
For Postfix, the relevant option is
smtpd_recipient_restrictions= ... ,permit_mynetworks, ...
which allows it to accept mail from a server on the same machine without pestering for a
password or client certificate or anything.
I also had to make sure the submitted email was "just right", as my rules are rather
picky. The error messages are clear: need full From address, etc.
More information about the Catalyst