in reply to Changing the 'From:' header with Mail::Mailer

UPDATED:

Hi,

As kilinrax already knows from our chat, the following will work (he confirmed it)

Upon another suggestion of mine kilinrax decided to use Mail::Sendmail  - v. 0.77 - Simple platform independent mailer. Hey it works.

I haven't tested this but it should work:

Mail::Send - Simple electronic mail interface --------------------------------------------------------- SYNOPSIS require Mail::Send; $msg = new Mail::Send; $msg = new Mail::Send Subject=>'example subject', To=>'timbo'; $msg->to('user@host'); $msg->subject('example subject'); $msg->cc('user@host'); $msg->bcc('someone@else'); $msg->set($header, @values); $msg->add($header, @values); $msg->delete($header); # Launch mailer and set headers. The filehandle returned # by open() is an instance of the Mail::Mailer class. $fh = $msg->open; print $fh "Body of message"; $fh->close; # complete the message and send it $fh->cancel; # not yet implemented

"cRaZy is co01, but sometimes cRaZy is cRaZy".
                                                      - crazyinsomniac

  • Comment on (crazyinsomniac) Re: Changing the 'From:' header with Mail::Mailer
  • Download Code

Replies are listed 'Best First'.
RE: Re: Changing the 'From:' header with Mail::Mailer
by kilinrax (Deacon) on Sep 14, 2000 at 22:51 UTC
    Yeah, using Mail::Sendmail works fine, thanks crazyinsomniac ;-)
    my %mail = ( To => 'abowley@lave.london.excite.com', From => 'god@heaven.com', Message => "Test" ); sendmail(%mail) or die $Mail::Sendmail::error;
    Still, if anyone can tell me a solution using Mail::Mailer, i'd really appreciate it, as using Mail::Sendmail will mean having to install it on N servers....