Class QEmailServer
This EmailServer (and its dependent EmailMessage class) allows the application to send messages via any accessible SMTP server.
The QEmailServer class, specifically, is an abstract class and is NOT meant to be instantiated. It has one public static method, Send, which takes in a QEmailMessage object.
- QBaseClass
- QEmailServer
public static
string[]
|
#
GetEmailAddresses( string $strAddresses )
Uses regular expression matching to return an array of valid e-mail addresses |
public static
boolean
|
#
IsEmailValid( string $strEmailAddress )
This will check to see if an email address is considered "Valid" according to RFC 2822. It utilizes the GetEmailAddresses static method, which does the actual logic work of checking. |
public static
|
#
Send(
Sends a message out via SMTP according to the server, ip, etc. preferences as set up on the class. Takes in a QEmailMessage object. Will throw a QEmailException exception on any error. |
OverrideAttributes(),
__call(),
__get(),
__set()
|
public static
string
|
$SmtpServer
Server Hostname or IP Address of the server running the SMTP service. Using an IP address is slightly faster, but using a Hostname is easier to manage. Defaults to "localhost". |
#
'localhost'
|
public static
integer
|
$SmtpPort
Port of the SMTP Service on the SmtpServer, usually 25 |
#
25
|
public static
string
|
$OriginatingServerIp
IP Address of the Originating Server (e.g. the IP address of this server) used for the EHLO command in the SMTP protocol. Defaults to the QApplication::$ServerAddress variable, which uses the PHP $_SERVER constants to determine the correct IP address. |
|
public static
boolean
|
$TestMode
Whether or not we are running in Test Mode. Test Mode allows you to develop e-mail-based applications without actually having access to an SMTP server or the Internet. Instead of messages being sent out, the messages and corresponding SMTP communication will be saved to disk. |
#
false
|
public static
string
|
$TestModeDirectory
The directory where TestMode e-mail files will be saved to. The process running the webserver must have write access to this directory. Default is "/tmp", which makes sense in unix/linux/mac environments. Windows users will likely need to set up their own temp directories. |
#
__TMP__
|
public static
boolean
|
$AuthPlain
Boolean flag signifying whether SMTP's AUTH PLAIN should be used |
#
false
|
public static
boolean
|
$AuthLogin
Boolean flag signifying whether SMTP's AUTH LOGIN should be used |
#
false
|
public static
string
|
$SmtpUsername
SMTP Username to use for AUTH PLAIN or LOGIN |
#
''
|
public static
string
|
$SmtpPassword
SMTP Password to use for AUTH PLAIN or LOGIN |
#
''
|
public static
string
|
$EncodingType
Encoding Type (if null, will default to the QApplication::$EncodingType) |
#
null
|