Net::ESMTP

SMTP client library (wrapper for C libESMTP library)
Download

Net::ESMTP Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Piotr Klaban
  • Publisher web site:
  • http://search.cpan.org/~makler/

Net::ESMTP Tags


Net::ESMTP Description

SMTP client library (wrapper for C libESMTP library) Net::ESMTP is a Perl module designed to manage posting e-mail using SMTP to a preconfigured Mail Transport Agent (MTA) such as postfix. This C wrapper should give you besides faster runtime, access to advanced features of the libESMTP as SASL, TLS, pipelining, a failover mechanism based on DNS, other SMTP extensions (ETRN, DSN, etc).Although Net::ESMTP includes methods for manipulating message headers, it does not support MIME. For MIME support look for e.g. MIME::Fast perl module (based on C library called gmime).WARNING: this code is still in beta phase, and interface methods could change.SYNOPSIS use Net::ESMTP; my $session = new Net::ESMTP::Session (); my $message = $session->add_message(); $session->set_server ("localhost:25"); # Set the reverse path for the mail envelope. (undef is ok) my $from; $message->set_reverse_path ($from); open FH, "< test.eml" || die "Can not open test.eml: $!"; my $str = join'',< FH >; $str =~ s/ //g; $str =~ s/ / /g; close (FH) || die "Close test.eml: $!"; # set message contents to send $message->set_message_str ($str); my $rcpt = 'test-nonexistent@nonexistent-example.com'; my $recipient = $message->add_recipient ($rcpt); $recipient->dsn_set_notify ( Notify_SUCCESS|Notify_FAILURE ); # # send message # if (!$session->start_session ()) { warn "SMTP server problem: " . smtp_strerror (smtp_errno ()); } else { my $status = $message->message_transfer_status(); print $status->{'code'} . ' ' . $status->{'text'}; } Requirements: · Perl


Net::ESMTP Related Software