PHP Class Pop\Mail\Mail

Author: Nick Sagona, III ([email protected])
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$attachments array File attachments
$group boolean Send as group flag
$headers array Mail headers
$message Message Message body
$params string Mail parameters
$queue Queue Sending queue
$subject string Subject

Méthodes publiques

Méthode Description
__construct ( string $subj = null, mixed $rcpts = null ) : Mail Constructor
add ( string $email, string $name = null ) : Mail Add a recipient to the queue
addRecipients ( mixed $rcpts ) : Mail Add recipients to the queue
attachFile ( string $file ) : Mail Attach a file to the mail object.
bcc ( string $email, string $name = null ) : Mail Alias to set the bcc headers
cc ( string $email, string $name = null ) : Mail Alias to set the cc headers
from ( string $email, string $name = null, boolean $replyTo = true ) : Mail Alias to set the from and reply-to headers
getAttachments ( ) : array Get attachments
getBoundary ( ) : string Get MIME boundary
getCharset ( ) : string Get character set
getEol ( ) : string Get EOL
getHeader ( string $name ) : string Get the mail header
getHeaders ( ) : array Get the mail header
getHtml ( ) : string Get HTML part of the message.
getMessage ( ) : Message Get the mail message
getQueue ( ) : Queue Get the mail queue
getSubject ( ) : string Get the subject
getText ( ) : string Get text part of the message.
replyTo ( string $email, string $name = null, boolean $from = true ) : Mail Alias to set the reply-to and from headers
saveTo ( string $to = null, string $format = null ) : Mail Save mail message or messages in a folder to be sent at a later date.
send ( ) : void Send mail message or messages.
sendAsGroup ( boolean $group ) : Mail Set the send as group flag
sendFrom ( string $from = null, boolean $delete = false ) : Mail Send mail message or messages that are saved in a folder.
setBoundary ( string $bnd = null ) : Mail Set MIME boundary
setCharset ( string $chr ) : Mail Set character set
setEol ( string $eol = Mail::CRLF ) : Mail Set EOL
setHeader ( string $name, string $value ) : Mail Set a mail header
setHeaders ( array $headers ) : Mail Set mail headers
setHtml ( string $html ) : Mail Set HTML part of the message.
setParams ( mixed $params = null ) : Mail Set parameters
setSubject ( string $subj ) : Mail Set the subject
setText ( string $text ) : Mail Set text part of the message.
to ( string $email, string $name = null ) : Mail Alias to add a recipient to the queue

Méthodes protégées

Méthode Description
buildHeaders ( ) : string Build headers
getEmailFromFile ( string $filename ) : array Get email data from file

Method Details

__construct() public méthode

Instantiate the mail object.
public __construct ( string $subj = null, mixed $rcpts = null ) : Mail
$subj string
$rcpts mixed
Résultat Mail

add() public méthode

Add a recipient to the queue
public add ( string $email, string $name = null ) : Mail
$email string
$name string
Résultat Mail

addRecipients() public méthode

Add recipients to the queue
public addRecipients ( mixed $rcpts ) : Mail
$rcpts mixed
Résultat Mail

attachFile() public méthode

Attach a file to the mail object.
public attachFile ( string $file ) : Mail
$file string
Résultat Mail

bcc() public méthode

Alias to set the bcc headers
public bcc ( string $email, string $name = null ) : Mail
$email string
$name string
Résultat Mail

buildHeaders() protected méthode

Build headers
protected buildHeaders ( ) : string
Résultat string

cc() public méthode

Alias to set the cc headers
public cc ( string $email, string $name = null ) : Mail
$email string
$name string
Résultat Mail

from() public méthode

Alias to set the from and reply-to headers
public from ( string $email, string $name = null, boolean $replyTo = true ) : Mail
$email string
$name string
$replyTo boolean
Résultat Mail

getAttachments() public méthode

Get attachments
public getAttachments ( ) : array
Résultat array

getBoundary() public méthode

Get MIME boundary
public getBoundary ( ) : string
Résultat string

getCharset() public méthode

Get character set
public getCharset ( ) : string
Résultat string

getEmailFromFile() protected méthode

Get email data from file
protected getEmailFromFile ( string $filename ) : array
$filename string
Résultat array

getEol() public méthode

Get EOL
public getEol ( ) : string
Résultat string

getHeader() public méthode

Get the mail header
public getHeader ( string $name ) : string
$name string
Résultat string

getHeaders() public méthode

Get the mail header
public getHeaders ( ) : array
Résultat array

getHtml() public méthode

Get HTML part of the message.
public getHtml ( ) : string
Résultat string

getMessage() public méthode

Get the mail message
public getMessage ( ) : Message
Résultat Message

getQueue() public méthode

Get the mail queue
public getQueue ( ) : Queue
Résultat Queue

getSubject() public méthode

Get the subject
public getSubject ( ) : string
Résultat string

getText() public méthode

Get text part of the message.
public getText ( ) : string
Résultat string

replyTo() public méthode

Alias to set the reply-to and from headers
public replyTo ( string $email, string $name = null, boolean $from = true ) : Mail
$email string
$name string
$from boolean
Résultat Mail

saveTo() public méthode

Save mail message or messages in a folder to be sent at a later date.
public saveTo ( string $to = null, string $format = null ) : Mail
$to string
$format string
Résultat Mail

send() public méthode

This method depends on the server being set up correctly as an SMTP server and sendmail being correctly defined in the php.ini file.
public send ( ) : void
Résultat void

sendAsGroup() public méthode

Set the send as group flag
public sendAsGroup ( boolean $group ) : Mail
$group boolean
Résultat Mail

sendFrom() public méthode

This method depends on the server being set up correctly as an SMTP server and sendmail being correctly defined in the php.ini file.
public sendFrom ( string $from = null, boolean $delete = false ) : Mail
$from string
$delete boolean
Résultat Mail

setBoundary() public méthode

Set MIME boundary
public setBoundary ( string $bnd = null ) : Mail
$bnd string
Résultat Mail

setCharset() public méthode

Set character set
public setCharset ( string $chr ) : Mail
$chr string
Résultat Mail

setEol() public méthode

Set EOL
public setEol ( string $eol = Mail::CRLF ) : Mail
$eol string
Résultat Mail

setHeader() public méthode

Set a mail header
public setHeader ( string $name, string $value ) : Mail
$name string
$value string
Résultat Mail

setHeaders() public méthode

Set mail headers
public setHeaders ( array $headers ) : Mail
$headers array
Résultat Mail

setHtml() public méthode

Set HTML part of the message.
public setHtml ( string $html ) : Mail
$html string
Résultat Mail

setParams() public méthode

Set parameters
public setParams ( mixed $params = null ) : Mail
$params mixed
Résultat Mail

setSubject() public méthode

Set the subject
public setSubject ( string $subj ) : Mail
$subj string
Résultat Mail

setText() public méthode

Set text part of the message.
public setText ( string $text ) : Mail
$text string
Résultat Mail

to() public méthode

Alias to add a recipient to the queue
public to ( string $email, string $name = null ) : Mail
$email string
$name string
Résultat Mail

Property Details

$attachments protected_oe property

File attachments
protected array $attachments
Résultat array

$group protected_oe property

Send as group flag
protected bool $group
Résultat boolean

$headers protected_oe property

Mail headers
protected array $headers
Résultat array

$message protected_oe property

Message body
protected Message,Pop\Mail $message
Résultat Message

$params protected_oe property

Mail parameters
protected string $params
Résultat string

$queue protected_oe property

Sending queue
protected Queue,Pop\Mail $queue
Résultat Queue

$subject protected_oe property

Subject
protected string $subject
Résultat string