0
#!/usr/bin/perl
use MIME::Lite;
my $to = 'mkumar@birdserver.com';
my $from = 'pkumar@birdserver.com';
my $subject = "Eventful";
my $message = " Hi  - Test email";
$msg = MIME::Lite->new(
             From     => $from,
             To       => $to,
             Subject  => $subject,
             Data     => $message
             );

$msg->attr('content-type' => 'text/html');
$msg->send;

I am using above script to send an email using Perl, but sometimes I am not receiving them. When I checked my maillog I got this message -

 Mar 27 08:16:02 EQ-BIRDSERVER sendmail[14361]: v2RFG24m014361: to=root,     delay=00:00:00, mailer=relay, pri=30444, stat=queued
 Mar 27 08:16:15 EQ-BIRDSERVER sendmail[4168]: rejecting connections on    daemon MTA: load average: 68

Is there any way to send email even during heavy load on the machine?

0

Is there any way to send email even during heavy load on the machine?

That's not something you can fix from your Perl script. The behavior of sendmail on high load depends on sendmails configuration which means that you need to either fix this or that you have to make sure that there is no high load on the machine.

Alternatively you could play with the various variants of sending mail as described in the documentation to see if one can help to work around the load limitations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.