Debbugs::Mail -- Outgoing Mail Handling
use Debbugs::Mail qw(send_mail_message get_addresses);
my @addresses = get_addresses('blah blah blah foo@bar.com') send_mail_message(message => <<END, recipients=>[@addresses]); To: $addresses[0] Subject: Testing
Testing 1 2 3 END
my @addresses = get_addresses('don@debian.org blars@debian.org
kamion@debian.org ajt@debian.org');
Given a string containing some e-mail addresses, parses the string using Mail::Address->parse and returns a list of the addresses.
my @head = default_headers(queue_file => 'foo',
data => $data,
msgid => $header{'message-id'},
msgtype => 'error',
headers => [...],
);
create_mime_message(\@headers,
...
);
This function is generally called to generate the headers for create_mime_message (and anything else that needs a set of default headers.)
In list context, returns an array of headers. In scalar context, returns headers for shoving in a mail message after encoding using encode_headers.
send_mail_message(message => $message,
recipients => [@recipients],
envelope_from => 'don@debian.org',
);
Returns true on success, false on failures. All errors are indicated using warn.
$message = encode_heeaders($message);
RFC 1522 encodes the headers of a message
rfc822_date
Return the current date in RFC822 format in the UTC timezone
_send_message($message,@sendmail_args);
Private function that actually calls sendmail with @sendmail_args and sends message $message.
dies with errors, so calls to this function in send_mail_message should be wrapped in eval.