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::SMTP(3) User Contributed Perl Documentation Mail::SendEasy::SMTP(3)

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

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

  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 ;

Create the SMTP object and connects to the server.

Connect to the server.

The authentication types supported by the SMTP server.

Does the authentication.
Send data to the socket connection.

Send a command to the server.

Returns the code response.

If wantarray returns an ARRAY with the response lines.

Returns an ARRAY with the response lines.

The last response text.

The last response line (code and text).

QUIT and close the connection.

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

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.