.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Mail::SendEasy::SMTP 3pm" .TH Mail::SendEasy::SMTP 3pm "2021-01-05" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Mail::SendEasy::SMTP \- Handles the communication with the SMTP server without dependencies. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module will handle the communication with the \s-1SMTP\s0 server. It hasn't dependencies and supports authentication. .SH "USAGE" .IX Header "USAGE" .Vb 1 \& use Mail::SendEasy ; \& \& $smtp = Mail::SendEasy::SMTP\->new( \*(Aqdomain.foo\*(Aq , 25 , 120 ) ; \& \& if ( !$smtp\->auth ) { warn($smtp\->last_response_line) ;} \& \& if ( $smtp\->MAIL("FROM:<$mail{from}>") !~ /^2/ ) { warn($smtp\->last_response_line) ;} \& \& if ( $smtp\->RCPT("TO:<$to>") !~ /^2/ ) { warn($smtp\->last_response_line) ;} \& \& if ( $smtp\->RCPT("TO:<$to>") !~ /^2/ ) { warn($smtp\->last_response_line) ;} \& \& if ( $smtp\->DATA =~ /^3/ ) { \& $smtp\->print("To: foo@foo") ; \& $smtp\->print("Subject: test") ; \& $smtp\->print("\en") ; \& $smtp\->print("This is a sample MSG!") ; \& if ( $smtp\->DATAEND !~ /^2/ ) { warn($smtp\->last_response_line) ;} \& } \& \& $smtp\->close ; .Ve .SH "METHODS" .IX Header "METHODS" .ie n .SS "new ($host , $port , $timeout , $user , $pass)" .el .SS "new ($host , \f(CW$port\fP , \f(CW$timeout\fP , \f(CW$user\fP , \f(CW$pass\fP)" .IX Subsection "new ($host , $port , $timeout , $user , $pass)" Create the \s-1SMTP\s0 object and connects to the server. .SS "connect" .IX Subsection "connect" Connect to the server. .SS "auth_types" .IX Subsection "auth_types" The authentication types supported by the \s-1SMTP\s0 server. .ie n .SS "auth($user , $pass)" .el .SS "auth($user , \f(CW$pass\fP)" .IX Subsection "auth($user , $pass)" Does the authentication. .SS "print (data)" .IX Subsection "print (data)" Send \fIdata\fR to the socket connection. .ie n .SS "cmd (\s-1CMD ,\s0 @MORE)" .el .SS "cmd (\s-1CMD ,\s0 \f(CW@MORE\fP)" .IX Subsection "cmd (CMD , @MORE)" Send a command to the server. .SS "response" .IX Subsection "response" Returns the code response. .PP If \fIwantarray\fR returns an \s-1ARRAY\s0 with the response lines. .SS "last_response" .IX Subsection "last_response" Returns an \s-1ARRAY\s0 with the response lines. .SS "last_response_msg" .IX Subsection "last_response_msg" The last response text. .SS "last_response_line" .IX Subsection "last_response_line" The last response line (code and text). .SS "close" .IX Subsection "close" \&\fB\s-1QUIT\s0\fR and close the connection. .SH "AUTHOR" .IX Header "AUTHOR" Graciliano M. P. .SH "COPYRIGHT" .IX Header "COPYRIGHT" This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.