Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Sending email attachments

by Willard B. Trophy (Hermit)
on Jul 24, 2003 at 21:43 UTC ( [id://277705]=note: print w/replies, xml ) Need Help??


in reply to Sending email attachments

Have you considered Mime::Lite? It's much easier than hitting sendmail directly.

You can do cool things like Spend Less Time Surfing: Pages In Your Inbox with LWP::Simple and MIME::Lite. But then, I would think that that was cool ...

--
bowling trophy thieves, die!

Replies are listed 'Best First'.
Re: Re: Sending email attachments
by simonm (Vicar) on Jul 24, 2003 at 22:51 UTC

    I'm out of votes for the day, but I'd give a ++ for Mime::Lite, and -- for talking to Sendmail directly.

    This should do the trick:

    my $msg = MIME::Lite->new( From => 'jc@home.com', To => $recipient, Subject => $dirContent, Data => "The file $dirContent is attached.\n" ); $msg->attach( Path => $dirContent, Type =>'AUTO' ); $msg->send;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://277705]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-03-19 04:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found