Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am using mime tools to assemle an email with a body and a text file attachment. However, the text file is just being inserted into the body of the email.
thats what I've got..any help, please! I've been going through the mime-tools docs and trying lots of variations but no luck yet.my $entity = MIME::Entity->build ( Type => 'multipart/mixed', From => 'email', To => 'address', Subject => "blah", ) or die "Error creating MIME entity: $!\n"; $entity->attach( Type => 'text/plain', #Encoding => 'base64', Data=>join("\n",@msg_body) ); $entity->attach( Filename => "report.txt", Type =>'text/plain', Data => join("\n",@attach) ) or die "Error adding the text message part: $!\n"; $entity->smtpsend;
thanks!
20041011 Edit by ysth: chage br tags to p and code
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mime tools attachments
by atcroft (Abbot) on Oct 12, 2004 at 04:57 UTC | |
|
Re: mime tools attachments
by neeraj (Scribe) on Oct 12, 2004 at 10:30 UTC |