email - Postfix Perl mailing via PostDrop -


i'm trying inject email directly postfix queue using perl module mail::postfix::postdrop ultilises postfix method of allowing messages written directly postdrop directory.

there small amount of documentation has enabled me send message successfully, however, confused how able set subject , message body. attempt set variable $message little nothing.

i must admit, i'm apprentice perl @ best, appreciate help.

#code sends email:     use mail::postfix::postdrop 'inject';          $message = 'test message';       inject $message, sender     => 'postmaster@mydomain.com',                        recipients => [ qw(email@someotherdomain.com) ]; 

some relavant documentation: http://annocpan.org/~pmakholm/mail-postfix-postdrop-0.3/lib/mail/postfix/postdrop.pm

in email messages "headers" section separated "body" section empty line. change $message to:

$message = "subject: subject!\n\nand message"; 

and should see you've set subject , message text. note "\n\n", creates empty line (double quotes used allow \n interpolation in $message).

note mail::postfix::postdrop claims accepts email::abstract object message, might consider using email::simple (or other email::abstract supporting class) create messages.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -