Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Mail::SendEasy::SMTP(3User Contributed Perl DocumentatiMail::SendEasy::SMTP(3)

NAME
       Mail::SendEasy::SMTP - Handles the communication	with the SMTP server
       without dependencies.

DESCRIPTION
       This module will	handle the communication with the SMTP server.	It
       hasn't dependencies and supports	authentication.

USAGE
	 use Mail::SendEasy ;

	 $smtp = Mail::SendEasy::SMTP->new( 'domain.foo' , 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("\n") ;
	   $smtp->print("This is a sample MSG!") ;
	   if (	$smtp->DATAEND !~ /^2/ ) { warn($smtp->last_response_line) ;}
	 }

	 $smtp->close ;

METHODS
   new ($host ,	$port ,	$timeout , $user , $pass)
       Create the SMTP object and connects to the server.

   connect
       Connect to the server.

   auth_types
       The authentication types	supported by the SMTP server.

   auth($user ,	$pass)
       Does the	authentication.

   print (data)
       Send data to the	socket connection.

   cmd (CMD , @MORE)
       Send a command to the server.

   response
       Returns the code	response.

       If wantarray returns an ARRAY with the response lines.

   last_response
       Returns an ARRAY	with the response lines.

   last_response_msg
       The last	response text.

   last_response_line
       The last	response line (code and	text).

   close
       QUIT and	close the connection.

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

COPYRIGHT
       This program is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

perl v5.24.1			  2004-04-09	       Mail::SendEasy::SMTP(3)

NAME | DESCRIPTION | USAGE | METHODS | AUTHOR | COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Mail::SendEasy::SMTP&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help