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

  • Email
  • Encoding
  • Parser
  • Sender
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Sender

Class for sending emails. Based on PhpMailer class (C) Copyright 2001-2003 Brent R. Matzelle

Namespace: Jyxo\Mail
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.php
Methods summary
public string
# getCharset( )

Returns charset.

Returns charset.

Returns

string
public Jyxo\Mail\Sender
# setCharset( string $charset )

Sets charset.

Sets charset.

Parameters

$charset
string
Final charset

Returns

Jyxo\Mail\Sender
public string
# getHostname( )

Returns hostname.

Returns hostname.

Returns

string
public Jyxo\Mail\Sender
# setHostname( string $hostname )

Sets hostname.

Sets hostname.

Parameters

$hostname
string
Hostname

Returns

Jyxo\Mail\Sender
public string
# getXmailer( )

Returns X-Mailer header value.

Returns X-Mailer header value.

Returns

string
public Jyxo\Mail\Sender
# setXmailer( string $xmailer )

Sets X-Mailer header value.

Sets X-Mailer header value.

Parameters

$xmailer
string
X-Mailer header value

Returns

Jyxo\Mail\Sender
public string
# getEncoding( )

Returns encoding.

Returns encoding.

Returns

string
public Jyxo\Mail\Sender
# setEncoding( string $encoding )

Sets encoding.

Sets encoding.

Parameters

$encoding
string
Encoding

Returns

Jyxo\Mail\Sender

Throws

InvalidArgumentException
If an incompatible encoding was provided
public Jyxo\Mail\Email
# getEmail( )

Returns the email to be sent.

Returns the email to be sent.

Returns

Jyxo\Mail\Email
public Jyxo\Mail\Sender
# setEmail( Jyxo\Mail\Email $email )

Sets the email to be sent.

Sets the email to be sent.

Parameters

$email
Jyxo\Mail\Email
Email instance

Returns

Jyxo\Mail\Sender
public Jyxo\Mail\Sender
# setSmtp( string $host, integer $port = 25, string $helo = '', string $user = '', string $password = '', integer $timeout = 5 )

Sets SMTP parameters.

Sets SMTP parameters.

Parameters

$host
string
Hostname
$port
integer
Port
$helo
string
HELO value
$user
string
Username
$password
string
Password
$timeout
integer
Connection timeout

Returns

Jyxo\Mail\Sender
public Jyxo\Mail\Sender\Result
# send( string $mode )

Sends an email using the given mode.

Sends an email using the given mode.

Parameters

$mode
string
Sending mode

Returns

Jyxo\Mail\Sender\Result

Throws

InvalidArgumentException
If an unknown mode was requested
Jyxo\Mail\Sender\Exception
On error
Jyxo\Mail\Sender\CreateException
If a required setting is missing
Constants summary
string MODE_MAIL 'mail'
#

Send using the internal mail() function.

Send using the internal mail() function.

string MODE_SMTP 'smtp'
#

Send using a SMTP server.

Send using a SMTP server.

string MODE_NONE 'none'
#

No sending. Useful if we actually don't want to send the message but just generate it.

No sending. Useful if we actually don't want to send the message but just generate it.

integer LINE_LENGTH 74
#

Maximum line length.

Maximum line length.

string LINE_END "\n"
#

Line ending.

Line ending.

string TYPE_SIMPLE 'simple'
#

Simple mail type.

Simple mail type.

string TYPE_ALTERNATIVE 'alternative'
#

Email with a HTML and plaintext part.

Email with a HTML and plaintext part.

string TYPE_ALTERNATIVE_ATTACHMENTS 'alternative_attachments'
#

Email with a HTML and plaintext part and attachments.

Email with a HTML and plaintext part and attachments.

string TYPE_ATTACHMENTS 'attachments'
#

Email with attachments.

Email with attachments.

Jyxo PHP Library API documentation generated by ApiGen 2.3.0