Package DE_EPAGES::MailType::API::Object::SmtpConnection
object interface for an SMTP Connection.
Base |
DE_EPAGES::Mail::API::SMTP |
Example |
my $Smtp = DE_EPAGES::MailType::API::Object::SmtpConnection->new; $Smtp->connection( sub { $Smtp->send( "This is a test", { 'FROM' => 'Sender <mailer@epages.de>', 'TO' => ['Recipient <rcpt@epages.de>'], 'SUBJECT' => 'Hallo', } ); }); |
Functions
close
obsolete. Use connection() instead.
Syntax |
$Connection->close(); |
new
Creates a new SmtpConnection object using the SMTP server that is
configured by the attributes SMTPServer, SMTPPort, SMTPLogin and
SMTPPassword of the System object unless these parameters are passed to
the sub-routine.
Syntax |
$Connection = DE_EPAGES::MailType::API::Object::SmtpConnection->new(); $Connection = DE_EPAGES::MailType::API::Object::SmtpConnection->new( $hParameters ); |
Example |
my $Connection = DE_EPAGES::MailType::API::Object::SmtpConnection->new({ 'SMTPServer' => 'mailgate.epages.de', 'SMTPPort' => 25, 'SMTPLogin' => 'mmustermann', 'SMTPPassword' => '123456', }); |
Input |
|
Return |
|
open
obsolete. Use connection() instead.
Syntax |
$Connection->open(); |
send
Send the e-mail using the SMPT connection
Syntax |
$Connection->send( $MailBody, $hParams ); |
Example |
$Connection->send( $Mail->createMail(), $Mail->getHeader()); |
Input |
|