Email
extends BaseConfig
in package
Class BaseConfig
Not intended to be used on its own, this class will attempt to automatically populate the child class' properties with values from the environment.
These can be set within the .env file.
Table of Contents
- $BCCBatchMode : bool
- Enable BCC Batch Mode.
- $BCCBatchSize : int
- Number of emails in each BCC batch
- $charset : string
- Character set (utf-8, iso-8859-1, etc.)
- $CRLF : string
- Newline character. (Use “\r\n” to comply with RFC 822)
- $DSN : bool
- Enable notify message from server
- $fromEmail : string
- $fromName : string
- $mailPath : string
- The server path to Sendmail.
- $mailType : string
- Type of mail, either 'text' or 'html'
- $newline : string
- Newline character. (Use “\r\n” to comply with RFC 822)
- $priority : int
- Email Priority. 1 = highest. 5 = lowest. 3 = normal
- $protocol : string
- The mail sending protocol: mail, sendmail, smtp
- $recipients : string
- $registrars : array<string|int, mixed>
- An optional array of classes that will act as Registrars for rapidly setting config class properties.
- $SMTPCrypto : string
- SMTP Encryption. Either tls or ssl
- $SMTPHost : string
- SMTP Server Address
- $SMTPKeepAlive : bool
- Enable persistent SMTP connections
- $SMTPPass : string
- SMTP Password
- $SMTPPort : int
- SMTP Port
- $SMTPTimeout : int
- SMTP Timeout (in seconds)
- $SMTPUser : string
- SMTP Username
- $userAgent : string
- The "user agent"
- $validate : bool
- Whether to validate the email address
- $wordWrap : bool
- Enable word-wrap
- $wrapChars : int
- Character count to wrap at
- $didDiscovery : bool
- Has module discovery happened yet?
- $moduleConfig : Modules
- The modules configuration.
- __construct() : mixed
- Will attempt to get environment variables with names that match the properties of the child class.
- getEnvValue() : mixed
- Retrieve an environment-specific configuration setting
- initEnvValue() : mixed
- Initialization an environment-specific configuration setting
- registerProperties() : mixed
- Provides external libraries a simple way to register one or more options into a config file.
Properties
$BCCBatchMode
Enable BCC Batch Mode.
public
bool
$BCCBatchMode
= false
$BCCBatchSize
Number of emails in each BCC batch
public
int
$BCCBatchSize
= 200
$charset
Character set (utf-8, iso-8859-1, etc.)
public
string
$charset
= 'UTF-8'
$CRLF
Newline character. (Use “\r\n” to comply with RFC 822)
public
string
$CRLF
= "
"
$DSN
Enable notify message from server
public
bool
$DSN
= false
$fromEmail
public
string
$fromEmail
$fromName
public
string
$fromName
$mailPath
The server path to Sendmail.
public
string
$mailPath
= '/usr/sbin/sendmail'
$mailType
Type of mail, either 'text' or 'html'
public
string
$mailType
= 'text'
$newline
Newline character. (Use “\r\n” to comply with RFC 822)
public
string
$newline
= "
"
$priority
Email Priority. 1 = highest. 5 = lowest. 3 = normal
public
int
$priority
= 3
$protocol
The mail sending protocol: mail, sendmail, smtp
public
string
$protocol
= 'mail'
$recipients
public
string
$recipients
$registrars
An optional array of classes that will act as Registrars for rapidly setting config class properties.
public
static array<string|int, mixed>
$registrars
= []
$SMTPCrypto
SMTP Encryption. Either tls or ssl
public
string
$SMTPCrypto
= 'tls'
$SMTPHost
SMTP Server Address
public
string
$SMTPHost
$SMTPKeepAlive
Enable persistent SMTP connections
public
bool
$SMTPKeepAlive
= false
$SMTPPass
SMTP Password
public
string
$SMTPPass
$SMTPPort
SMTP Port
public
int
$SMTPPort
= 25
$SMTPTimeout
SMTP Timeout (in seconds)
public
int
$SMTPTimeout
= 5
$SMTPUser
SMTP Username
public
string
$SMTPUser
$userAgent
The "user agent"
public
string
$userAgent
= 'CodeIgniter'
$validate
Whether to validate the email address
public
bool
$validate
= false
$wordWrap
Enable word-wrap
public
bool
$wordWrap
= true
$wrapChars
Character count to wrap at
public
int
$wrapChars
= 76
$didDiscovery
Has module discovery happened yet?
protected
static bool
$didDiscovery
= false
$moduleConfig
The modules configuration.
protected
static Modules
$moduleConfig
Methods
__construct()
Will attempt to get environment variables with names that match the properties of the child class.
public
__construct() : mixed
The "shortPrefix" is the lowercase-only config class name.
Return values
mixed —getEnvValue()
Retrieve an environment-specific configuration setting
protected
getEnvValue(string $property, string $prefix, string $shortPrefix) : mixed
Parameters
- $property : string
- $prefix : string
- $shortPrefix : string
Return values
mixed —initEnvValue()
Initialization an environment-specific configuration setting
protected
initEnvValue(mixed &$property, string $name, string $prefix, string $shortPrefix) : mixed
Parameters
- $property : mixed
- $name : string
- $prefix : string
- $shortPrefix : string
Return values
mixed —registerProperties()
Provides external libraries a simple way to register one or more options into a config file.
protected
registerProperties() : mixed