
WWW::Webrobot::SendMail - simple wrapper for sending mail

WWW::Webrobot::SendMail::send_mail($mailconfig);

Function to send mail. Uses MIME::Lite.

Function to send mail
my $mailconfig = {
server => "somesever.yourdomain.org", # mandatory
timeout => 60, # default=60
# fields for MIME::Lite, ignores case on left hand side
'Return-Path' => 'from@domain.de', # defaults to 'From' attribute
From => 'webrobot',
'Reply-To' => 'reply@domain.de',
To => 'to@domain.de',
Cc => 'some@other.com, some@more.com',
Bcc => 'blind@domain.de',
Subject => 'Subject for mail',
Type => 'text/plain',
Encoding => 'quoted-printable', # 'quoted-printable', 'base64'
#Path => 'hellonurse.gif'
Data => <<'EOF',
Thats the body of the
mail you want to send.
EOF
$exit acts as an error state thats compared to $mail->{condition}
Return value:
0: Mail has been sent. Note that doesn't mean that the mail can be delivered. not 0: Mail can't be sent (e.g. wrong mail server)