EDIT: Here's what I use:
EDIT: atcroft is right that header lines should be separated by CRLF instead of just \n (does it matter if it's \r\n or \n\r?) That changes my code to the above. Note the Return-Path btw - you don't want any rejected emails to get sent to a black hole instead of your primary email.$smtp->datasend("From: $from\n\r" . "Return-Path: $from\n\r" . "Reply-To: $from\n\r" . "To: $to\n\r" . "Subject: $subject\n\r\n\r" . $message);
In reply to Re: Net::SMTP - To: and From: not appearing in headers?
by TedPride
in thread Net::SMTP - To: and From: not appearing in headers?
by ghenry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |