Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

auto mail

by vivid (Beadle)
on Sep 16, 2010 at 06:04 UTC ( #860315=perlquestion: print w/replies, xml ) Need Help??
vivid has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, i want to send mail with attachment through perl. Anybody can help me please. Thanks Vivid

Replies are listed 'Best First'.
Re: auto mail
by GrandFather (Sage) on Sep 16, 2010 at 06:12 UTC
Re: auto mail
by zentara (Archbishop) on Sep 16, 2010 at 10:17 UTC
    Google "perl mail attachments" for hundreds of examples, or look at this simple example:
    #!/usr/bin/perl use warnings; use strict; use MIME::Lite; $MIME::Lite::AUTO_CONTENT_TYPE="true"; my $msg = MIME::Lite->new( From => 'zentara' , To => '' , Subject => 'test attach', Type => 'multipart/mixed' ); $msg->attach( Path => './mailbody' , Filename => 'message.txt' ); $msg->attach( Path => "./logfile_07-24-2005.tar.gz" , Disposition => "attachment" ); $msg->send; print "Mission accomplished\n";

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://860315]
Approved by GrandFather
[Corion]: marto: Oh, I'm jealous. I'm going to see DM in Frankfurt, but it's a stadium full of people, so, rather a big thing where you mostly get to see the band on screens ;)
[marto]: yes, the last time I saw them was in Berlin a few years ago, at the old Olympic stadium

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2017-03-24 11:32 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (301 votes). Check out past polls.