Re: How attach files and send mails on perl????



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
.



Relevant Pages

  • Re: Anime with the "Oldest Profession"?
    ... One series that comes to my mind is "Hidamari no Ki", ... Nozomu spends an expensive weekend with a gorgeous prostitute because he is ... Akane of Magic Users Club OAV is practicing Enjo. ... Enjo in order to get people alone and rob them, ...
    (rec.arts.anime.misc)
  • Re: there is no global warming....population is no problem...please dont worry!
    ... >>>Hoping to rob the till, ... >> good to see where your 'mind' naturally turns... ... >> looking to supplement your dole? ...
    (uk.politics.misc)
  • Re: What da ya think, COPE?
    ... Keep in your mind that it's rather robbing if not stealing! ... connect these DOTs - killing, rob, capitalists, etc in order to give ... Learn more about rob! ... Do your post mortem reality check homework ...
    (soc.culture.burma)
  • Re: What da ya think, COPE?
    ... Keep in your mind that it's rather robbing if not stealing! ... connect these DOTs - killing, rob, capitalists, etc in order to give ... robbery & robbers you might have overlooked and possibly be obsessed ... Learn more about rob! ...
    (soc.culture.burma)