GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mail::SendEasy(3) User Contributed Perl Documentation Mail::SendEasy(3)

Mail::SendEasy - Send plain/html e-mails through SMTP servers (platform independent). Supports SMTP authentication and attachments.

This modules will send in a easy way e-mails, and doesn't have dependencies. Soo, you don't need to install libnet.

It supports SMTP authentication and attachments.

  use Mail::SendEasy ;

  my $mail = new Mail::SendEasy(
  smtp => 'localhost' ,
  user => 'foo' ,
  pass => 123 ,
  ) ;
  
  my $status = $mail->send(
  from    => 'sender@foo.com' ,
  from_title => 'Foo Name' ,
  reply   => 're@foo.com' ,
  error   => 'error@foo.com' ,
  to      => 'recp@domain.foo' ,
  cc      => 'recpcopy@domain.foo' ,
  subject => "MAIL Test" ,
  msg     => "The Plain Msg..." ,
  html    => "<b>The HTML Msg...</b>" ,
  msgid   => "0101" ,
  ) ;
  
  if (!$status) { print $mail->error ;}

  use Mail::SendEasy ;

  my $status = Mail::SendEasy::send(
  smtp => 'localhost' ,
  user => 'foo' ,
  pass => 123 ,
  from    => 'sender@foo.com' ,
  from_title => 'Foo Name' ,
  reply   => 're@foo.com' ,
  error   => 'error@foo.com' ,
  to      => 'recp@domain.foo' ,
  cc      => 'recpcopy@domain.foo' ,
  subject => "MAIL Test" ,
  msg     => "The Plain Msg..." ,
  html    => "<b>The HTML Msg...</b>" ,
  msgid   => "0101" ,
  ) ;
  
  if (!$status) { Mail::SendEasy::error ;}

%OPTIONS:
smtp
The SMTP server. (Default: localhost)
port
The SMTP port. (Default: 25)
timeout
The time to wait for the connection and data. (Default: 120)
user
The username for authentication.
pass
The password for authentication.

%OPTIONS:
from
The e-mail adress of the sender. (Only accept one adress).
from_title
The name or title of the sender.
reply
E-mail used to reply to your e-mail.
error
E-mail to send error messages.
to
Recipient e-mail adresses.
cc
Adresses to receive a copy.
subject
The subject of your e-mail.
msg
The plain message.
html
The HTML message. If used with MSG (plain), the format "multipart/alternative" will be used. Readers that can read HTML messages will use the HTML argument, and readers with only plain messages will use MSG.
msgid
An ID to insert in the e-mail Headers. The header will be: Msg-ID: xxxxx
anex
Send file(s) attached. Just put the right path in the machine for the file. For more than one file use ARRAY ref: ['file1','file2']

** Will load all the files in the memory.

zipanex
Compress with zip the ANEX (attached) file(s). All the files will be inside the same zip file.

If the argument has the extension .zip, will be used for the name of the zip file. If not, the file will be "anex.zip", and if exist only one ANEX, the name will be the same of the ANEX, but with the extension .zip.

** Need the module Archive::Zip installed or the argument will be skipped.

** This will generate the zip file in the memory.

Mail::SendEasy::SMTP, Mail::SendEasy::AUTH, HPL.

This module was created to handle the e-mail system of HPL.

Graciliano M. P. <gm@virtuasites.com.br>

I will appreciate any type of feedback (include your opinions and/or suggestions). ;-P

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2004-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.