Overview

Namespaces

  • Jyxo
    • Beholder
      • TestCase
    • Gettext
      • Parser
    • Input
      • Chain
      • Filter
      • Validator
    • Mail
      • Email
        • Attachment
      • Parser
      • Sender
    • Rpc
      • Json
      • Xml
    • Shell
    • Spl
    • Svn
    • Time
    • Webdav
  • PHP

Classes

  • Result
  • Smtp

Exceptions

  • CreateException
  • Exception
  • RecipientUnknownException
  • SmtpException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Smtp

Class for sending emails using a SMTP server. Works in combination with \Jyxo\Mail\Sender.

Namespace: Jyxo\Mail\Sender
Category: Jyxo
Package: Jyxo\Mail
Subpackage: Sender
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Jaroslav HanslĂ­k
Located at Mail/Sender/Smtp.php
Methods summary
public
# __construct( string $host = 'localhost', integer $port = 25, string $helo = 'localhost', integer $timeout = 5 )

Creates an instance.

Creates an instance.

Parameters

$host
string
Server hostname
$port
integer
Server port
$helo
string
HELO value
$timeout
integer
Connection timeout
public
# __destruct( )

Destroys an instance and disconnects from the server.

Destroys an instance and disconnects from the server.

public Jyxo\Mail\Sender\Smtp
# connect( )

Connects to the SMTP server.

Connects to the SMTP server.

Returns

Jyxo\Mail\Sender\Smtp

Throws

Jyxo\Mail\Sender\SmtpException
If a connection error occurs
public Jyxo\Mail\Sender\Smtp
# disconnect( )

Disconnects from server.

Disconnects from server.

Returns

Jyxo\Mail\Sender\Smtp
public Jyxo\Mail\Sender\Smtp
# auth( string $user, string $password )

Connects to the server using a username and password.

Connects to the server using a username and password.

Parameters

$user
string
Username
$password
string
Password

Returns

Jyxo\Mail\Sender\Smtp

Throws

Jyxo\Mail\Sender\SmtpException
On authentication error
public Jyxo\Mail\Sender\Smtp
# from( string $from )

Sets the sender.

Sets the sender.

Parameters

$from
string
Sender

Returns

Jyxo\Mail\Sender\Smtp
public Jyxo\Mail\Sender\Smtp
# recipient( string $recipient )

Adds a recipient.

Adds a recipient.

Parameters

$recipient
string
Recipient

Returns

Jyxo\Mail\Sender\Smtp
public Jyxo\Mail\Sender\Smtp
# data( string $header, string $body )

Sends email headers and body.

Sends email headers and body.

Parameters

$header
string
Headers
$body
string
Body

Returns

Jyxo\Mail\Sender\Smtp

Throws

Jyxo\Mail\Sender\SmtpException
On data sending error
public Jyxo\Mail\Sender\Smtp
# reset( )

Resets previous commands.

Resets previous commands.

Returns

Jyxo\Mail\Sender\Smtp
Constants summary
string LINE_END "\r\n"
#

Line endings.

Line endings.

Jyxo PHP Library API documentation generated by ApiGen 2.3.0