in reply to Re: NET::SMTP help
in thread NET::SMTP help

how do I add the from and subject headers using NET::SMTP. sorry a little new to NET::SMTP. the example is pretty basic.

Replies are listed 'Best First'.
Re^3: NET::SMTP help
by Tanktalus (Canon) on Mar 10, 2005 at 16:45 UTC
    $s->to($to); $s->mail($from); $s->data(); $s->datasend("To: $to\n"); ### $s->datasend("From: $from\n"); $s->datasend("Subject: Hi, this looks like SPAM ... but it ain't.\ +n"); $s->datasend('Date: ', scalar(time), "\n"); ### $s->datasend("\n"); $s->datasend("$message \n" ); $s->datasend( "\n" ); $s->dataend(); $s->quit();

    Note the lines I added between the triple-hashmarks.

      cool I thought so.. =)