You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a perl script run from a web form that create 1 to n emails. I was hoping Email::Sender would be more efficient than calling sendmail directly. However I have a problem in that the email sometimes go and other times they fail to return and the script times out.
here is a partial program sample:
use Email::Sender::Simple qw(try_to_sendmail);
use Email::Simple;
use Email::Simple::Creator;
use Data::Dumper;
use CGI;
$q = new CGI;
...
my $to = """ . $user{user_name} . "" <$user{email}>";
print "sending to $to\n";
my $msg = Email::Simple->create(
header => [
To => $to,
From => '[email protected]',
Subject => 'Login for PharmaNet',
],
body => $body,
);
print Dumper($msg);
my $res = eval {
try_to_sendmail($msg);
};
print "sent $res\n";
Here is the output from a failed attempt:
sending to "Emergency, Demo Account" [email protected]
$VAR1 = bless( {
'body' => 'You have requested a password reset
on 2016/05/04 10:56:05.
If you did not request this, then you should contact your supervisor
immediately to report this.
It should get to the sent $res statement but it doesn't
There is nothing in the webserver logs to suggest there is a problem, other than it will quit once the timeout occurs.
I just downloaded the most recent version through CPAN.
I'm running an Apache web server and a pretty standard sendmail.
Is there something obvious I'm missing?
The text was updated successfully, but these errors were encountered:
I have a perl script run from a web form that create 1 to n emails. I was hoping Email::Sender would be more efficient than calling sendmail directly. However I have a problem in that the email sometimes go and other times they fail to return and the script times out.
here is a partial program sample:
use Email::Sender::Simple qw(try_to_sendmail);
use Email::Simple;
use Email::Simple::Creator;
use Data::Dumper;
use CGI;
$q = new CGI;
...
my $to = """ . $user{user_name} . "" <$user{email}>";
print "sending to $to\n";
my $msg = Email::Simple->create(
header => [
To => $to,
From => '[email protected]',
Subject => 'Login for PharmaNet',
],
body => $body,
);
print Dumper($msg);
my $res = eval {
try_to_sendmail($msg);
};
print "sent $res\n";
Here is the output from a failed attempt:
sending to "Emergency, Demo Account" [email protected]
$VAR1 = bless( {
'body' => 'You have requested a password reset
on 2016/05/04 10:56:05.
If you did not request this, then you should contact your supervisor
immediately to report this.
Click Here
to reset your password.
Your User ID will already be filled in.
Thank you
Medinet Support Staff
',
'mycrlf' => '
',
'header' => bless( {
'headers' => [
'To',
[
'"Emergency, Demo Account" [email protected]',
'To: "Emergency, Demo Account" [email protected]'
],
'From',
[
'[email protected]',
'From: [email protected]'
],
'Subject',
[
'Login for PharmaNet',
'Subject: Login for PharmaNet'
],
'Date',
'Wed, 4 May 2016 10:56:05 -0700'
],
'mycrlf' => '
'
}, 'Email::Simple::Header' )
}, 'Email::Simple' );
It should get to the sent $res statement but it doesn't
There is nothing in the webserver logs to suggest there is a problem, other than it will quit once the timeout occurs.
I just downloaded the most recent version through CPAN.
I'm running an Apache web server and a pretty standard sendmail.
Is there something obvious I'm missing?
The text was updated successfully, but these errors were encountered: