Trouble sending an email with Mailer module



Hi,

I'm having some trouble getting the Mailer module to work. I keep
getting this error

No recipient addresses found in header

although in my code, below, I include a "To" clause. But clearly I'm
doing something wrong ...

my $body = "Blah blah blah:\n\n";

my %headers = {From => "$p_sender",
To => "$p_recipient",
Subject => "$p_subject"
};
my $mailer = Mail::Mailer->new();
$mailer->open(\%headers);
print $mailer $body;
$mailer->close;

Any ideas? Thanks, - Dave

.



Relevant Pages

  • Re: archival/compliance/etc.
    ... of e-mail for searching on sender, recipient, date, subject, body, etc. ... messages that you are archiving. ... macro which is then passed to a Milter that would add an archive Bcc: ... it does not generate a Bcc: header so these recipients do not show ...
    (comp.mail.sendmail)
  • Re: archival/compliance/etc.
    ... of e-mail for searching on sender, recipient, date, subject, body, etc. ... Create a hash database with a list of addresses that need archiving. ... add an archive Bcc: ... it does not generate a Bcc: header so these recipients do not show ...
    (comp.mail.sendmail)
  • Re: Spoofing "TO" Address in email
    ... >recipient in the header. ... Internet gateway that receives the mail to ADD a received header, ... those lines can contain any fairy tail the spammer wishes to include. ...
    (alt.computer.security)
  • Re: Spoofing "TO" Address in email
    ... Connection closed by foreign host. ... "From:" header. ... Transfer Agent (MTA - or your mail server). ...
    (alt.computer.security)
  • Re: Merge in HEADER problem
    ... either the data or the field codes. ... Is the data you're showing in the Header also in the main ... in Print Layout and press Alt+F9 do you ... But, when the recipient does a print preview, or tries to ...
    (microsoft.public.word.mailmerge.fields)