Mail::SendEasy(3pm)
โจ Mail::SendEasy โจ
okay bestie, sit down, hydrate, and let me tell you about Mail::SendEasy โ it's a Perl module from the User Contributed Perl Documentation crew, and it's literally here to send your emails for you. ๐ซถ
๐ NAME
Mail::SendEasy โ send plain/html e-mails through SMTP servers (platform independent). Supports SMTP authentication and attachments. ๐
๐ธ DESCRIPTION
So this module sends e-mails the easy way, and the way that it has no dependencies? Iconic. Fr fr, you do not need to install libnet. Not even a little bit. ๐
It supports SMTP authentication and attachments. That's the whole vibe. โจ
๐ฆ USAGE
๐ OO
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 ;}
๐ STRUCTURED
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 ;}
๐ METHODS
๐ new (%OPTIONS)
here's your %OPTIONS menu, bestie:
smtpโ the SMTP server. (Default:localhost) ๐ฅ๏ธportโ the SMTP port. (Default:25) ๐timeoutโ how long it waits for the connection and data. (Default:120) โณuserโ the username for authentication. ๐ชชpassโ the password for authentication. ๐
๐ send (%OPTIONS)
and here's the %OPTIONS for sending, no cap:
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 withMSG(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 useMSG. ๐ป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 theANEX(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.
๐ง SEE ALSO
Mail::SendEasy::SMTP, Mail::SendEasy::AUTH, HPL.
This module was created to handle the e-mail system of HPL. ๐
๐ AUTHOR
Graciliano M. P. <gm@virtuasites.com.br>
I will appreciate any type of feedback (include your opinions and/or suggestions). ;-P ๐
๐ COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay that's the whole page, bestie!! this lil gem is from perl v5.32.0, dated 2021-01-05, and it's living its best life as Mail::SendEasy(3pm) in the User Contributed Perl Documentation collection. go send some emails, you got this ๐โจ๐๐ฆ๐ธ๐
๐ซถ๐ญ๐ฅ๐๐โญ๐๐๐๐ง๐
๐ฆ where this page comes from
- debian bookworm: libmail-sendeasy-perl 1.2-2.1
- debian trixie: libmail-sendeasy-perl 1.2-2.1
- ubuntu jammy: libmail-sendeasy-perl 1.2-2.1
- ubuntu noble: libmail-sendeasy-perl 1.2-2.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms