bradcathey has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monasterians,
Been using MIME::Lite for ages, but never with an attachment. I keep getting an error regardless of permissions set, type of file, location on server, etc.
#!/usr/bin/perl use strict; use CGI::Carp qw(fatalsToBrowser); use Data::Dumper; use MIME::Lite; my $msg = MIME::Lite->new( From => 'foo@bar.com', To => 'bar@foo.com', Subject => "Test", Type =>'multipart/mixed' ); $msg->attach( Type => 'text/html', Data => '<h1><i>This is a test</i></h1>' ); $msg->attach(Type =>'image/gif', Path =>'/usr/home/account/files/test.gif', Disposition => 'attachment' ); $msg->send();
And the error:
email_test.pl: /usr/home/account/files/test.gif: not readableWhat should I be looking for? Is this a MIME::Lite problem or something with Unix/Apache? Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MIME::Lite and attachments
by Joost (Canon) on May 24, 2007 at 21:58 UTC | |
by bradcathey (Prior) on May 24, 2007 at 22:09 UTC | |
by Joost (Canon) on May 24, 2007 at 22:13 UTC | |
by bradcathey (Prior) on May 25, 2007 at 07:11 UTC | |
by shmem (Chancellor) on May 25, 2007 at 07:33 UTC | |
|
Re: MIME::Lite and attachments
by GrandFather (Saint) on May 24, 2007 at 21:59 UTC | |
by bradcathey (Prior) on May 24, 2007 at 22:11 UTC | |
|
Re: MIME::Lite and attachments
by Joost (Canon) on May 24, 2007 at 21:58 UTC |