Loading ...
Sorry, an error occurred while loading the content.

Mail::Mailer

Expand Messages
  • Nancy Pettigrew
    I m trying to use the Mail::Mailer package, but I m getting a strange error, even after cutting the code down to just a simple example: Here s the code:
    Message 1 of 1 , Aug 4, 2000
    • 0 Attachment
      I'm trying to use the Mail::Mailer package, but I'm getting a strange error,
      even after cutting the code down to just a simple example:

      Here's the code:
      #!/usr/bin/perl -w

      use Mail::Mailer;
      use Mail::Mailer qw(mail);

      my $mailer = Mail::Mailer->new("smtp","mail.mydomain.com");

      $mailer->open('From' => 'me@...',
      'To' => 'you@...',
      'Subject' => 'This is the subject');

      print $mailer "This is the Text";

      $mailer->close or die "Can't close mailer: $!";

      Here's the error:
      Can't use string ("From") as a HASH ref while "strict refs" in use at
      /usr/local/lib/perl5/site_perl/5.6.0/Mail/Mailer.pm line 293.

      Is this a problem with Mail::Mailer?
    Your message has been successfully submitted and would be delivered to recipients shortly.