CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
EMAIL::MIME ERRORS

 



Appy16
New User

Mar 14, 2010, 11:26 PM

Post #1 of 2 (651 views)
EMAIL::MIME ERRORS Can't Post

I am trying to send an attachment using Email::Mime. But the problem is that i recieve the following error.

"Can't open file 'i.gif' for input:
No such file or directory at test7.pl line 11"

My Script is Given below:

#!/usr/bin/perl

use Email::MIME::Creator;
use Email::MIME;
use IO::All;

$from = 'abc1\@gmail.com';
$to = 'abc11\@gmail.com';
$cc = 'abc2\@hotmail.com';

my $email = Email::MIME->create(
header => [
From => $from ,
To => $to ,
Cc => $cc ,
],
attributes => {
filename => "/users/abc/desktop/i.gif",
content_type => "image/gif",
name => "i.gif",
},
body => io( "i.gif" )->all,

);

print "\nMail Sent\n";

Please Help


(This post was edited by Appy16 on Mar 15, 2010, 11:17 PM)


FishMonger
Veteran / Moderator

Mar 15, 2010, 8:09 AM

Post #2 of 2 (642 views)
Re: [Appy16] EMAIL::MIME ERRORS [In reply to] Can't Post

The script you posted doesn't have 'iperl.pdf' anywhere in it so, I'd say that the script that you're executing is not the one you think you're executing.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives