- Symphony 2.5.2
-
› assets
14 -
› boot
13 -
› core
23 -
› cryptography
4 -
› data-sources
0 -
› email-gateways
3 -
› events
3 -
› global
44 -
› interface
8 -
› toolkit
71 - Delegates91
- Deprecated14
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public abstract class EmailGateway
class.emailgateway.php #49A base class for email gateways. All email-gateways should extend this class in order to work.
Methods
void __construct()
The constructor sets the _boundary_mixed
and _boundary_alter
variables
to be unique hashes based off PHP's uniqid
function.
void __destruct()
The destructor ensures that any open connections to the Email Gateway is closed.
boolean|mixed __get(
$name)
Gets a property.
Magic function, supplied by php.
This function will attempt to find a variable set with $name
and
returns it. If the variable is not set, it will return false.
Parameters
void|boolean __set(
$name, $value)
Sets a property.
Magic function, supplied by php. This function will try and find a method of this class, by camelcasing the name, and appending it with set. If the function can not be found, an exception will be thrown.
Parameters
void appendAttachment(
$file)
Appends one file attachment to the attachments array.
Parameters
void appendHeaderField(
$name, $body)
Appends a single header field to the header fields array. The header field should be presented as a name/body pair.
Parameters
void appendHeaderFields(
$header_array)
Appends one or more header fields to the header fields array. Header fields should be presented as an array with name/body pairs.
Parameters
boolean closeConnection()
Close the connection to the email Server. This function is used to allow persistent connections.
array contentInfoArray(
$type, $file, $filename, $charset)
Builds the right content-type/encoding types based on file and content-type.
Will try to match a common description, based on the $type param. If nothing is found, will return a base64 attached file disposition.
Can be used to send to an email server directly.
Parameters
XMLElement getPreferencesPane()
The preferences to add to the preferences pane in the admin area.
boolean openConnection()
Open new connection to the email server. This function is used to allow persistent connections.
boolean send()
Sends the actual email. This function should be implemented in the Email Gateway itself and should return true or false if the email was successfully sent. See the default gateway for an example.
void setAttachments(
$files)
This function sets one or multiple attachment files to the email.
Passing null
to this function will
erase the current values with an empty array.
Parameters
boolean setConfiguration(
$config)
Sets all configuration entries from an array. This enables extensions like the ENM to create email settings panes that work regardless of the email gateway. Every gateway should extend this method to add their own settings.
void setFrom(
$email, $name)
Sets the sender-email and sender-name.
Parameters
void setRecipients(
$email)
Sets the recipients.
Parameters
void setReplyToEmailAddress(
$email)
Sets the reply-to-email.
Parameters
void setReplyToName(
$name)
Sets the reply-to-name.
Parameters
void setSenderEmailAddress(
$email)
Sets the sender-email.
Parameters
void setSenderName(
$name)
Sets the sender-name.
Parameters
void setSubject(
$subject)
Sets the subject.
Parameters
void setTextEncoding(
$encoding)
Parameters
void setTextHtml(
$text_html)
This functions takes a string to be used as the HTML content for the Email
void setTextPlain(
$text_plain)
This functions takes a string to be used as the plaintext content for the Email
boolean validate()
Makes sure the Subject, Sender Email and Recipients values are
all set and are valid. The message body is checked in
prepareMessageBody