Overview

Namespaces

  • Charcoal
    • Email
      • Script
      • ServiceProvider

Classes

  • Email
  • EmailConfig
  • EmailLog
  • EmailQueueItem
  • EmailQueueManager
  • GenericEmailTemplate

Interfaces

  • EmailInterface

Traits

  • EmailAwareTrait
  • Overview
  • Namespace
  • Class

Class EmailConfig

Email configuration.

Charcoal\Config\AbstractConfig
Extended by Charcoal\Email\EmailConfig uses Charcoal\Email\EmailAwareTrait
Namespace: Charcoal\Email
Located at Charcoal/Email/EmailConfig.php
Methods summary
public array
# defaults( )

Default email configuration.

Default email configuration.

Returns

array
public Charcoal\Email\EmailConfig
# setSmtp( boolean $smtp )

Set whether SMTP should be used for sending the email.

Set whether SMTP should be used for sending the email.

Parameters

$smtp
If the email should be sent using SMTP or not.

Returns

Charcoal\Email\EmailConfig
Chainable

Throws

InvalidArgumentException
If the SMTP state is not a boolean.
public boolean
# smtp( )

Determine if SMTP should be used.

Determine if SMTP should be used.

Returns

boolean
public Charcoal\Email\EmailConfig
# setSmtpHostname( string $hostname )

Set the SMTP hostname to be used.

Set the SMTP hostname to be used.

Parameters

$hostname
The SMTP hostname.

Returns

Charcoal\Email\EmailConfig
Chainable

Throws

InvalidArgumentException
If the SMTP hostname is not a string.
public string
# smtpHostname( )

Get the SMTP hostname.

Get the SMTP hostname.

Returns

string
public Charcoal\Email\EmailConfig
# setSmtpPort( integer $port )

Set the SMTP port to be used.

Set the SMTP port to be used.

Parameters

$port
The SMTP port.

Returns

Charcoal\Email\EmailConfig
Chainable

Throws

InvalidArgumentException
If the SMTP port is not an integer.
public integer
# smtpPort( )

Get the SMTP port.

Get the SMTP port.

Returns

integer
public Charcoal\Email\EmailConfig
# setSmtpAuth( boolean $auth )

Set whether SMTP requires authentication.

Set whether SMTP requires authentication.

Parameters

$auth
The SMTP authentication flag (if auth is required).

Returns

Charcoal\Email\EmailConfig
Chainable
public boolean
# smtpAuth( )

Determine if SMTP requires authentication.

Determine if SMTP requires authentication.

Returns

boolean
public Charcoal\Email\EmailConfig
# setSmtpUsername( string $username )

Set the SMTP username to be used.

Set the SMTP username to be used.

Parameters

$username
The SMTP username, if using authentication.

Returns

Charcoal\Email\EmailConfig
Chainable

Throws

InvalidArgumentException
If the SMTP username is not a string.
public string
# smtpUsername( )

Get the SMTP username.

Get the SMTP username.

Returns

string
public Charcoal\Email\EmailConfig
# setSmtpPassword( string $password )

Set the SMTP password to be used.

Set the SMTP password to be used.

Parameters

$password
The SMTP password, if using authentication.

Returns

Charcoal\Email\EmailConfig
Chainable

Throws

InvalidArgumentException
If the SMTP password is not a string.
public string
# smtpPassword( )

Get the SMTP password.

Get the SMTP password.

Returns

string
public Charcoal\Email\EmailConfig
# setSmtpSecurity( string $security )

Set the SMTP security type to be used.

Set the SMTP security type to be used.

Parameters

$security
The SMTP security type (empty, "TLS", or "SSL").

Returns

Charcoal\Email\EmailConfig
Chainable

Throws

InvalidArgumentException
If the security type is not valid (empty, "TLS", or "SSL").
public string
# smtpSecurity( )

Get the SMTP security type.

Get the SMTP security type.

Returns

string
public Charcoal\Email\EmailConfig
# setDefaultFrom( string|array $email )

Set the default sender's email address.

Set the default sender's email address.

Parameters

$email
The default "From" email address.

Returns

Charcoal\Email\EmailConfig
Chainable

Throws

InvalidArgumentException
If the email address is invalid.
public string
# defaultFrom( )

Get the sender email address.

Get the sender email address.

Returns

string
public Charcoal\Email\EmailConfig
# setDefaultReplyTo( string|array $email )

Set the default "Reply-To" email address.

Set the default "Reply-To" email address.

Parameters

$email
The default "Reply-To" email address.

Returns

Charcoal\Email\EmailConfig
Chainable

Throws

InvalidArgumentException
If the email address is invalid.
public string
# defaultReplyTo( )

Get the "Reply-To" email address.

Get the "Reply-To" email address.

Returns

string
public Charcoal\Email\EmailConfig
# setDefaultLog( boolean $log )

Set whether the email should be logged by defaultd.

Set whether the email should be logged by defaultd.

Parameters

$log
The default log flag.

Returns

Charcoal\Email\EmailConfig
Chainable
public boolean
# defaultLog( )

Determine if the email should be logged by default.

Determine if the email should be logged by default.

Returns

boolean
public Charcoal\Email\EmailConfig
# setDefaultTrack( boolean $track )

Set whether the email should be tracked by default.

Set whether the email should be tracked by default.

Parameters

$track
The default track flag.

Returns

Charcoal\Email\EmailConfig
Chainable
public boolean
# defaultTrack( )

Determine if the email should be tracked by default.

Determine if the email should be tracked by default.

Returns

boolean
Methods used from Charcoal\Email\EmailAwareTrait
emailFromArray(), emailToArray()
API documentation generated by ApiGen