Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   Enquires Mail::Send - NewBie (http://www.velocityreviews.com/forums/t897293-enquires-mail-send-newbie.html)

Dolphin 04-04-2006 09:24 AM

Enquires Mail::Send - NewBie
 
Hi,

Where can I get the information such as example and howto for Mail:Send CPAN
module? I visited CPAN site but don't understand after reading.

Thanks in advance.



Bart Van der Donck 04-04-2006 10:53 AM

Re: Enquires Mail::Send - NewBie
 
Dolphin wrote:

> Where can I get the information such as example and howto for Mail:Send CPAN
> module? I visited CPAN site but don't understand after reading.


Well, I'ld say there isn't much more to say about Mail::Send.

Here is a stripped example to play around with:

#!/usr/bin/perl
use strict;
use warnings;
use Mail::Send;

my $msg = new Mail::Send;
$msg->to('dolphin@yahoo.com');
$msg->subject('Lunch today ?');

# which mail program you want to use
my $fh = $msg->open('sendmail');

# print the body of the email
print $fh 'Lunch 12:30 in Café de Gare ?';

# close the mail
$fh->close;

But I think you would make a better choice by using Net::SMTP or a
classic pipe command to your favourite mail sending program.

--
Bart



All times are GMT. The time now is 01:27 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.