Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Sending email with Mail::Internet

by rjsaulakh (Beadle)
on Feb 12, 2005 at 07:49 UTC ( #430378=perlquestion: print w/replies, xml ) Need Help??

rjsaulakh has asked for the wisdom of the Perl Monks concerning the following question:

i have perfectly installed the module Mail::Internet

but still i get error of cant find a file Can't locate auto/Mail/Internet/

#!/usr/bin/perl use Mail::Internet; exit; my $head = Mail::Internet->new ; $head->add(From => ''); $head->add(To => ''); $head->add(Cc => ''); $head->add(Cc => ''); $head->add(Cc => ''); $head->add(Subject => 'hello there'); my $body =<<END; this is just a mail dont panic nothing much Regards , raman END $mail = Mail::Internet->new(Header => $head, Body => [$body], Modify => 1); print $mail->send('sendmail');

Replies are listed 'Best First'.
Re: Sending email with Mail::Internet
by jZed (Prior) on Feb 12, 2005 at 08:02 UTC
    Change the line $head = Mail::Internet->new() to Mail::Header->new .... you are using the wrong class.
Re: Sending email with Mail::Internet
by FitTrend (Pilgrim) on Feb 12, 2005 at 20:36 UTC

    Out of curiousity, is there any particular reason your using Mail::Internet? You may want to check out MIME::Lite and Mail::Sender. It might offer more flexibility in your emailing needs.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://430378]
Approved by holli
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2022-05-17 21:33 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (68 votes). Check out past polls.