On Wed, Apr 21, 2010 at 4:20 AM, David Precious <davidp@preshweb.co.uk> wrote:
Hi Naveed,
On Tuesday 20 April 2010 09:26:26 Naveed Massjouni wrote:
When I try to send mail from within a route, I get:
error when closing pipe to sendmail: No child processes Trace begun at /usr/local/share/perl/5.10.0/Email/Sender/Transport/Sendmail.pm line 77
On line 77 of Sendmail.pm it is just closing a file handle: close $pipe or Email::Sender::Failure->throw("error when closing pipe to sendmail: $!");
Hmm, I see no reason that Dancer should prevent that working.
I was just wondering if this was a bug in Dancer or if I'm doing something wrong.
I can't think of a reason for that to fail when used from Dancer.
Are both scripts running on the same system, as the same user etc?
Are you able to share the scripts, so we can have a poke around in the debugger?
Cheers
Dave P
-- David Precious <davidp@preshweb.co.uk> http://blog.preshweb.co.uk/ www.preshweb.co.uk/twitter www.preshweb.co.uk/linkedin www.preshweb.co.uk/facebook www.preshweb.co.uk/identica www.lyricsbadger.co.uk
"Programming is like sex. One mistake and you have to support it for the rest of your life". (Michael Sinz) _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
Here is the dancer script: --- #!/usr/bin/perl use Dancer; use Email::Sender::Simple; use Email::Simple; get '/email' => sub { my $success = Email::Sender::Simple->send(Email::Simple->create( header => [ To => 'naveedm9@gmail.com', From => 'foo@bar.com', Subject => 'hello', ], )); return $success ? 'good job' : 'failed'; }; dance; --- The email actually does get sent when someone visits that route. But I get a huge Route Handler Error on the browser with a stack trace. Can you try that code and see if it works for you? Thanks, Naveed