maynardtwinn has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to send a csv file as an attachment. The email sends just fine, and has the attachment, but some of the file is removed. It's almost like there is a size limit and it truncates the end of the file. The original is 56KB the emailed file is 48KB. I have tried with multiple different, though the same type of files.
Here is the code I'm using to send the email... though obviously with valid email addresses.
use MIME::Lite; MIME::Lite->send("smtp","mail.mine.com"); my $msg = MIME::Lite->new( From => 'some@thing.com', To => 'me@mine.com', Subject => 'A Report', Type => 'multipart/mixed', ); $msg->attach( Type =>'TEXT', Data => "This is your pretty report", ); $msg->attach( Type => 'text/csv', Path => 'file.csv', Filename => 'file.csv', Disposition => 'attachment' ) or die "Error adding file \n"; $msg->send;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Email attachment being truncated.
by Neighbour (Friar) on Sep 12, 2012 at 13:08 UTC | |
by Anonymous Monk on Jun 21, 2016 at 18:16 UTC | |
by Anonymous Monk on Aug 28, 2014 at 18:57 UTC | |
|
Re: Email attachment being truncated.
by Anonymous Monk on Sep 12, 2012 at 00:28 UTC | |
|
Re: Email attachment being truncated.
by swampyankee (Parson) on Sep 12, 2012 at 01:49 UTC | |
|
Re: Email attachment being truncated.
by nextguru (Scribe) on Sep 12, 2012 at 07:41 UTC |