Jump to content

Perl Question


Aella

Recommended Posts

Hi :lol:

 

I found this script which is supposed to mail me when a file not found error has occured.

 

 

use Mail::Mailer;

# create the body of our HTML and mail message.

  my $body = "File not found!\n";

  $body .= "Here's the environment I was called with:\n\n";

  while ( my ($var, $val) = each %ENV ) { $body .= "  $var = $val\n"; }

 

  # mail our warning off.

  my $mailer = Mail::Mailer->new("sendmail");

  $mailer->open({ From    => "404\@aellalei.com",

                  To      => "aella\@aellalei.com",

                  Subject => "A 404 Has Been Detected!",

                });

  print $mailer $body;

  $mailer->close();

 

I put it in my 404 error document, and it works... sort of. I get a message in my inbox saying "This message was created automatically by mail delivery software.

 

 

A message that you sent could not be delivered to one or more of its

recipients. This is a permanent error. The following address(es) failed:" It goes on to say that it failed to lock mailbox.

 

What does that mean "failed to lock mailbox"? Is that something I can fix?

 

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...