Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: auto mail

by zentara (Archbishop)
on Sep 16, 2010 at 10:17 UTC ( #860332=note: print w/replies, xml ) Need Help??


in reply to auto mail

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 => 'zentara@z.net' , 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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://860332]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-11-23 03:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (328 votes). Check out past polls.

    Notices?