neilwatson has asked for the wisdom of the Perl Monks concerning the following question:
if ($nooatt > 0){ $sender->OpenMultipart({ smtp =>"$smtp", to =>"$callemail", from =>"$ticketad", fake_from =>"$ticketad", subject =>"Reply from Me: $callid", headers => "Errors-To: postmaster\@mydomain.com"}); die "Error: $Mail::Sender::Error\n" unless ref $sender; $sender->Body; $sender->SendLineEnc(<<"*END*"); $body *END* #build attachments for ($x=0; $x < $nooatt; $x++){ $sender->Attach({ description => "attachment$x", ctype => "$atttype[$x]", encoding => "Base64", disposition => "attachment; filename=\"$attname[$x]\"; type +=\"$atttype[$x]\"", file => "$attachment[$x]"}); die "Error: $Mail::Sender::Error\n" unless ref $sender; }
$attachment[$x] contains the contents of a file NOT the path to a file. Will this work? Is there another way to do it?
Neil Watson
watson-wilson.ca
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sending email attachments with a twist
by fruiture (Curate) on Sep 18, 2002 at 19:38 UTC | |
|
Re: Sending email attachments with a twist
by neilwatson (Priest) on Sep 18, 2002 at 20:34 UTC |