Re: How attach files and send mails on perl????
- From: rob.dixon@xxxxxxx (Rob Dixon)
- Date: Wed, 11 Jun 2008 22:11:41 +0100
Armin Garcia wrote:
hi !!!
thanks for your help ....
And im sorry Rob, but this code its not mine ... but thanks, i never see
in my mind how you minimize that code, really thanks for your help, and
i found another module named MIME::Lite, its more easy to use, and
attach files, and do another things very quickly and easy ....
But Thank so much
I include the code that i'm writting in this time (i mean the time when
i was post this message and found this module, and read your replys), i
hope my code are more visible :D
#!/usr/bin/perl
As I said, always
use strict;
use warnings;
use MIME::Lite;
$msg = new MIME::Lite;
my $msg = new MIME::Lite;
and so on
$msg->build(
Type => 'x-gzip',
Path => "gzip < /home/agarcia/HoneyClient/backup-2008-06-11.tar |",
ReadNow => 1,
Filename => "SomeFile.tgz"
);
$msg->add(From => "agarcia\@server1.com.mx <http://server1.com.mx>");
$msg->add(To => "bec_agarcia\@server2.com.mx <http://server2.com.mx>");
$msg->add(Subject => "Test attach files");
### Send the Message
#MIME::Lite->send('smtp', honeyclient.seguridad.unam.mx
<http://honeyclient.seguridad.unam.mx>, Timeout=>60);
$msg->send;
thanks for all and see you soon....
Good luck.
Rob
.
- References:
- How attach files and send mails on perl????
- From: Armin Garcia
- Re: How attach files and send mails on perl????
- From: Rob Dixon
- Re: How attach files and send mails on perl????
- From: Armin Garcia
- How attach files and send mails on perl????
- Prev by Date: Re: Comparing fields in 2 large files
- Next by Date: Re: looping 2 times through 5000 differs from 5000 times through 2
- Previous by thread: Re: How attach files and send mails on perl????
- Next by thread: Re: How attach files and send mails on perl????
- Index(es):
Relevant Pages
|