in reply to Re: problem with Mail::Sender while sending email
in thread problem with Mail::Sender while sending email
#!/usr/bin/perl use Mail::Sender; open(FH,"file.txt"); my $var; while(<FH>) { $var .= $_; } close(FH); eval { Mail::Sender->new( {from => 'from@domain.com', smtp => 'smtp.server.com'}) ->OpenMultipart({ to => '', subject => 'Subject Here!', multipart => 'related', }) ->Part({ ctype => 'text/html', disposition => 'NONE', msg => <<'*END*' $var}) $var *END* ->Attach({ description => 'test file', ctype => 'application/octet-stream', encoding => 'base64', disposition => "attachment; filename= file1 ", file => 'file1' }) ->Close(); } or print "Error sending mail: $Mail::Sender::Error\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: problem with Mail::Sender while sending email
by chandanperl (Novice) on Aug 26, 2009 at 05:01 UTC | |
by james2vegas (Chaplain) on Aug 26, 2009 at 05:07 UTC | |
by Boldra (Curate) on Aug 28, 2009 at 12:55 UTC | |
by Jenda (Abbot) on Aug 28, 2009 at 19:21 UTC | |
by Boldra (Curate) on Aug 31, 2009 at 09:49 UTC | |
by Anonymous Monk on Aug 31, 2009 at 09:56 UTC |