public
|
#
__construct( string $charset = 'utf-8' )
Create a new mailer object and optionally set the character set being used.
Create a new mailer object and optionally set the character set being used.
Parameters
- $charset
- The character set being used either 'utf-8' the default or 'iso-8859-1'.
|
public static
|
#
setMailerString( string $mailer )
Set the string to use in the X-Mailer header system wide.
Set the string to use in the X-Mailer header system wide.
Parameters
- $mailer
- The mailer string to set.
|
public
flEmail
|
#
setPriority( integer $priority )
Set the priority to send the mail at.
Set the priority to send the mail at.
Parameters
- $priority
- The priority to use.
Returns
|
public
flEmail
|
#
setLocalhost( string $localhost )
Set the host name used in HELO/EHLO negotiation.
Set the host name used in HELO/EHLO negotiation.
Parameters
- $localhost
- The name of the local host used in HELO/EHLO.
Returns
|
public
flEmail
|
#
setServer( string $host, integer $port, string $user = '', string $pass = '' )
Set the SMTP server to use for sending emails and the authentication information.
Set the SMTP server to use for sending emails and the authentication information.
Parameters
- $host
- The SMTP host.
- $port
- The port to connect to on the SMTP server, default is 25.
- $user
- The user name to connect with, or '' if authentication not required.
- $pass
- The password for the user.
Returns
|
public
boolean
|
#
connect( )
Form a connection to the SMTP server.
Form a connection to the SMTP server.
Returns
boolean True if connected else false.
|
public
boolean
|
#
send( )
Send the email
Returns
boolean true if the email was sent or false if the email could not be sent.
|
public
|
#
close( )
Close the connection to the SMTP server.
Close the connection to the SMTP server.
|
public
flEmail
|
#
setFrom( string $email, string $name = '' )
Set the email address of the sender.
Set the email address of the sender.
Parameters
- $email
- Email address of the sender.
- $name
- Name of the sender.
Returns
|
public
flEmail
|
#
replyTo( string $email, string $name = '' )
Set the email address to send replies to.
Set the email address to send replies to.
Parameters
- $email
- Email address to reply to.
- $name
- Name of the address to reply to.
Returns
|
public
flEmail
|
#
clearReplyTo( )
Clear the reply to address
Clear the reply to address
Returns
|
public
flEmail
|
#
addRecipient( string $email, string $name = '' )
Add an email address to the recipient list (To:)
Add an email address to the recipient list (To:)
Parameters
- $email
- Email address of the recipient.
- $name
- Name of the recipient.
Returns
|
public
flEmail
|
#
clearRecipients( )
Clear the recipient list.
Clear the recipient list.
Returns
|
public
flEmail
|
#
addCc( string $email, string $name = '' )
Add an email address to the Cc list
Add an email address to the Cc list
Parameters
- $email
- Email address of the recipient.
- $name
- Name of the recipient.
Returns
|
public
flEmail
|
#
clearCc( )
Clear the Cc list.
Returns
|
public
flEmail
|
#
addBcc( string $email, string $name = '' )
Add an email address to the Bcc list
Add an email address to the Bcc list
Parameters
- $email
- Email address of the recipient.
- $name
- Name of the recipient.
Returns
|
public
flEmail
|
#
clearBcc( )
Clear the Bcc list.
Returns
|
public
flEmail
|
#
setSubject( string $subject )
Set the subject.
Parameters
- $subject
- The subject string.
Returns
|
public
flEmail
|
#
setTextBody( string $text )
Set the text body.
Parameters
Returns
|
public
flEmail
|
#
setHTMLBody( string $html )
Set the HTML body encoding it to quoted-printable, and references to embedded files are updated.
Set the HTML body encoding it to quoted-printable, and references to embedded files are updated.
Parameters
Returns
|
public
flEmail
|
#
clearBody( )
Clear the email body.
Returns
|
public
boolean
|
#
attachFile( string $file, string $type = null, string $name = null )
Attach a file to the email.
Attach a file to the email.
Parameters
- $file
- The file name of the file to attach.
- $type
- The mime type, e.g. image/jpeg
- $name
- Optional file name to attach the file as.
Returns
boolean true is returned if the file was attached or false on error.
|
public
|
#
attachFileData( string $data, string $type, string $name )
Attach file data to the email.
Attach file data to the email.
Parameters
- $data
- The file data to attach.
- $type
- The mime type, e.g. image/jpeg
- $name
- File name to attach the file as.
|
public
flEmail
|
#
clearAttachedFiles( )
Clear the list of attached files.
Clear the list of attached files.
Returns
|
public
boolean
|
#
addEmbeddedFile( string $file, string $src, string $type = null )
Embed an image file within the email, these files are only sent if an HTML email is also present.
Embed an image file within the email, these files are only sent if an HTML email is also present.
All embedded files must be added before calling setHTMLBody or they will not be referenced.
Parameters
- $file
- The name of the file within the file system to embed.
- $src
- The file name used in the HTMl to reference the file, must be an exact match.
- $type
The mime type of the file e.g. image/jpg, image/gif or image/png or null to guess
the type from the file name.
Returns
boolean true is returned if the file was embedded or false on error.
|
public
|
#
addEmbeddedFileData( string $data, string $src, string $type = null )
Embed an image file within the email, these files are only sent if an HTML email is also present.
Embed an image file within the email, these files are only sent if an HTML email is also present.
All embedded files must be added before calling setHTMLBody or they will not be referenced.
Parameters
- $data
- The data to embed.
- $src
- The file name used in the HTMl to reference the file, must be an exact match.
- $type
The mime type of the file e.g. image/jpg, image/gif or image/png or null to guess
the type from the file name.
|
public
flEmail
|
#
clearEmbedded( )
Clear the list of embedded files.
Clear the list of embedded files.
Returns
|