SmartHome
|
Public Member Functions | |
IsHTML ($bool) | |
IsSMTP () | |
IsMail () | |
IsSendmail () | |
IsQmail () | |
AddAddress ($address, $name= '') | |
AddCC ($address, $name= '') | |
AddBCC ($address, $name= '') | |
AddReplyTo ($address, $name= '') | |
Send () | |
SendmailSend ($header, $body) | |
MailSend ($header, $body) | |
SmtpSend ($header, $body) | |
SmtpConnect () | |
SmtpClose () | |
SetLanguage ($lang_type, $lang_path= 'language/') | |
AddrAppend ($type, $addr) | |
AddrFormat ($addr) | |
WrapText ($message, $length, $qp_mode=false) | |
UTF8CharBoundary ($encodedText, $maxLength) | |
SetWordWrap () | |
CreateHeader () | |
GetMailMIME () | |
CreateBody () | |
GetBoundary ($boundary, $charSet, $contentType, $encoding) | |
EndBoundary ($boundary) | |
SetMessageType () | |
HeaderLine ($name, $value) | |
TextLine ($value) | |
AddAttachment ($path, $name= '', $encoding= 'base64', $type= 'application/octet-stream') | |
AttachAll () | |
EncodeFile ($path, $encoding= 'base64') | |
EncodeString ($str, $encoding= 'base64') | |
EncodeHeader ($str, $position= 'text') | |
HasMultiBytes ($str) | |
Base64EncodeWrapMB ($str) | |
EncodeQP ($input= '', $line_max=76, $space_conv=false) | |
EncodeQ ($str, $position= 'text') | |
AddStringAttachment ($string, $filename, $encoding= 'base64', $type= 'application/octet-stream') | |
AddEmbeddedImage ($path, $cid, $name= '', $encoding= 'base64', $type= 'application/octet-stream') | |
InlineImageExists () | |
ClearAddresses () | |
ClearCCs () | |
ClearBCCs () | |
ClearReplyTos () | |
ClearAllRecipients () | |
ClearAttachments () | |
ClearCustomHeaders () | |
SetError ($msg) | |
RFCDate () | |
ServerVar ($varName) | |
ServerHostname () | |
Lang ($key) | |
IsError () | |
FixEOL ($str) | |
AddCustomHeader ($custom_header) | |
MsgHTML ($message, $basedir='') | |
_mime_types ($ext= '') | |
set ($name, $value= '') | |
getFile ($filename) | |
SecureHeader ($str) | |
Sign ($cert_filename, $key_filename, $key_pass) | |
Data Fields | |
$Priority = 3 | |
$CharSet = 'iso-8859-1' | |
$ContentType = 'text/plain' | |
$Encoding = '8bit' | |
$ErrorInfo = '' | |
$From = 'abdullahbayraktar9@gmail.com' | |
$FromName = 'Admin' | |
$Sender = '' | |
$Subject = '' | |
$Body = '' | |
$AltBody = '' | |
$WordWrap = 0 | |
$Mailer = 'mail' | |
$Sendmail = '/usr/sbin/sendmail' | |
$PluginDir = '' | |
$Version = "2.0.4" | |
$ConfirmReadingTo = '' | |
$Hostname = '' | |
$MessageID = '' | |
$Host = 'localhost' | |
$Port = 25 | |
$Helo = '' | |
$SMTPSecure = "" | |
$SMTPAuth = false | |
$Username = 'abdullahbayraktar9' | |
$Password = '' | |
$Timeout = 10 | |
$SMTPDebug = false | |
$SMTPKeepAlive = false | |
$SingleTo = false | |
$smtp = NULL | |
$to = array() | |
$cc = array() | |
$bcc = array() | |
$ReplyTo = array() | |
$attachment = array() | |
$CustomHeader = array() | |
$message_type = '' | |
$boundary = array() | |
$language = array() | |
$error_count = 0 | |
$LE = "\n" | |
$sign_cert_file = "" | |
$sign_key_file = "" | |
$sign_key_pass = "" | |
_mime_types | ( | $ext = '' ) |
Gets the mime type of the embedded or inline image private
AddAddress | ( | $address, | |
$name = '' |
|||
) |
Adds a "To" address.
string | $address | |
string | $name |
AddAttachment | ( | $path, | |
$name = '' , |
|||
$encoding = 'base64' , |
|||
$type = 'application/octet-stream' |
|||
) |
Adds an attachment from a path on the filesystem. Returns false if the file could not be found or accessed.
string | $path | Path to the attachment. |
string | $name | Overrides the attachment name. |
string | $encoding | File encoding (see $Encoding). |
string | $type | File extension (MIME) type. |
AddBCC | ( | $address, | |
$name = '' |
|||
) |
Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
string | $address | |
string | $name |
AddCC | ( | $address, | |
$name = '' |
|||
) |
Adds a "Cc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
string | $address | |
string | $name |
AddCustomHeader | ( | $custom_header) |
Adds a custom header.
AddEmbeddedImage | ( | $path, | |
$cid, | |||
$name = '' , |
|||
$encoding = 'base64' , |
|||
$type = 'application/octet-stream' |
|||
) |
Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".
string | $path | Path to the attachment. |
string | $cid | Content ID of the attachment. Use this to identify the Id for accessing the image in an HTML form. |
string | $name | Overrides the attachment name. |
string | $encoding | File encoding (see $Encoding). |
string | $type | File extension (MIME) type. |
AddrAppend | ( | $type, | |
$addr | |||
) |
Creates recipient headers. private
AddReplyTo | ( | $address, | |
$name = '' |
|||
) |
Adds a "Reply-To" address.
string | $address | |
string | $name |
AddrFormat | ( | $addr) |
Formats an address correctly. private
AddStringAttachment | ( | $string, | |
$filename, | |||
$encoding = 'base64' , |
|||
$type = 'application/octet-stream' |
|||
) |
Adds a string or binary attachment (non-filesystem) to the list. This method can be used to attach ascii or binary data, such as a BLOB record from a database.
string | $string | String attachment data. |
string | $filename | Name of the attachment. |
string | $encoding | File encoding (see $Encoding). |
string | $type | File extension (MIME) type. |
AttachAll | ( | ) |
Attaches all fs, string, and binary attachments to the message. Returns an empty string on failure. private
Base64EncodeWrapMB | ( | $str) |
Correctly encodes and wraps long multibyte strings for mail headers without breaking lines within a character. Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php private
string | $str | multi-byte text to wrap encode |
ClearAddresses | ( | ) |
Clears all recipients assigned in the TO array. Returns void.
ClearAllRecipients | ( | ) |
Clears all recipients assigned in the TO, CC and BCC array. Returns void.
ClearAttachments | ( | ) |
Clears all previously set filesystem, string, and binary attachments. Returns void.
ClearBCCs | ( | ) |
Clears all recipients assigned in the BCC array. Returns void.
ClearCCs | ( | ) |
Clears all recipients assigned in the CC array. Returns void.
ClearCustomHeaders | ( | ) |
Clears all custom headers. Returns void.
ClearReplyTos | ( | ) |
Clears all recipients assigned in the ReplyTo array. Returns void.
CreateBody | ( | ) |
Assembles the message body. Returns an empty string on failure. private
CreateHeader | ( | ) |
Assembles message header. private
EncodeFile | ( | $path, | |
$encoding = 'base64' |
|||
) |
Encodes attachment in requested format. Returns an empty string on failure. private
EncodeHeader | ( | $str, | |
$position = 'text' |
|||
) |
Encode a header string to best of Q, B, quoted or none. private
EncodeQ | ( | $str, | |
$position = 'text' |
|||
) |
Encode string to q encoding. private
EncodeQP | ( | $input = '' , |
|
$line_max = 76 , |
|||
$space_conv = false |
|||
) |
Encode string to quoted-printable. private
EncodeString | ( | $str, | |
$encoding = 'base64' |
|||
) |
Encodes string to requested format. Returns an empty string on failure. private
EndBoundary | ( | $boundary) |
Returns the end of a message boundary. private
FixEOL | ( | $str) |
Changes every end of line from CR or LF to CRLF. private
GetBoundary | ( | $boundary, | |
$charSet, | |||
$contentType, | |||
$encoding | |||
) |
Returns the start of a message boundary. private
getFile | ( | $filename) |
Read a file from a supplied filename and return it.
public
string | $filename | Parameter File Name |
GetMailMIME | ( | ) |
Returns the message MIME. private
HasMultiBytes | ( | $str) |
Checks if a string contains multibyte characters. private
string | $str | multi-byte text to wrap encode |
HeaderLine | ( | $name, | |
$value | |||
) |
InlineImageExists | ( | ) |
Returns true if an inline attachment is present. private
IsError | ( | ) |
Returns true if an error occurred.
IsHTML | ( | $bool) |
Sets message type to HTML.
bool | $bool |
IsMail | ( | ) |
Sets Mailer to send message using PHP mail() function.
IsQmail | ( | ) |
Sets Mailer to send message using the qmail MTA.
IsSendmail | ( | ) |
Sets Mailer to send message using the $Sendmail program.
IsSMTP | ( | ) |
Sets Mailer to send message using SMTP.
Lang | ( | $key) |
Returns a message in the appropriate language. private
MailSend | ( | $header, | |
$body | |||
) |
Sends mail using the PHP mail() function. private
MsgHTML | ( | $message, | |
$basedir = '' |
|||
) |
Evaluates the message and returns modifications for inline images and backgrounds public
RFCDate | ( | ) |
Returns the proper RFC 822 formatted date. private
SecureHeader | ( | $str) |
Strips newlines to prevent header injection. private
string | $str | String |
Send | ( | ) |
Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error.
SendmailSend | ( | $header, | |
$body | |||
) |
Sends mail using the $Sendmail program. private
ServerHostname | ( | ) |
Returns the server hostname or 'localhost.localdomain' if unknown. private
ServerVar | ( | $varName) |
Returns the appropriate server variable. Should work with both PHP 4.1.0+ as well as older versions. Returns an empty string if nothing is found. private
set | ( | $name, | |
$value = '' |
|||
) |
Set (or reset) Class Objects (variables)
Usage Example: $page->set('X-Priority', '3');
public
string | $name | Parameter Name |
mixed | $value | Parameter Value NOTE: will not work with arrays, there are no arrays to set/reset |
SetError | ( | $msg) |
Adds the error message to the error container. Returns void. private
SetLanguage | ( | $lang_type, | |
$lang_path = 'language/' |
|||
) |
Sets the language for all class error messages. Returns false if it cannot load the language file. The default language type is English.
string | $lang_type | Type of language (e.g. Portuguese: "br") |
string | $lang_path | Path to the language file directory public |
SetMessageType | ( | ) |
Sets the message type. private
SetWordWrap | ( | ) |
Set the body wrapping. private
Sign | ( | $cert_filename, | |
$key_filename, | |||
$key_pass | |||
) |
Set the private key file and password to sign the message.
public
string | $key_filename | Parameter File Name |
string | $key_pass | Password for private key |
SmtpClose | ( | ) |
Closes the active SMTP session if one exists.
SmtpConnect | ( | ) |
Initiates a connection to an SMTP server. Returns false if the operation failed. private
SmtpSend | ( | $header, | |
$body | |||
) |
Sends mail via SMTP using PhpSMTP (Author: Chris Ryan). Returns bool. Returns false if there is a bad MAIL FROM, RCPT, or DATA input. private
TextLine | ( | $value) |
Returns a formatted mail line. private
UTF8CharBoundary | ( | $encodedText, | |
$maxLength | |||
) |
Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string. Original written by Colin Brown. private
string | $encodedText | utf-8 QP text |
int | $maxLength | find last character boundary prior to this length |
WrapText | ( | $message, | |
$length, | |||
$qp_mode = false |
|||
) |
Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable. Original written by philippe. private
$AltBody = '' |
$attachment = array() |
$bcc = array() |
$Body = '' |
$boundary = array() |
$cc = array() |
$CharSet = 'iso-8859-1' |
$ConfirmReadingTo = '' |
$ContentType = 'text/plain' |
$CustomHeader = array() |
$Encoding = '8bit' |
$error_count = 0 |
$ErrorInfo = '' |
$From = 'abdullahbayraktar9@gmail.com' |
$FromName = 'Admin' |
$Helo = '' |
$Host = 'localhost' |
$Hostname = '' |
$language = array() |
$LE = "\n" |
$Mailer = 'mail' |
$message_type = '' |
$MessageID = '' |
$Password = '' |
$PluginDir = '' |
$Port = 25 |
$Priority = 3 |
$ReplyTo = array() |
$Sender = '' |
$Sendmail = '/usr/sbin/sendmail' |
$sign_cert_file = "" |
$sign_key_file = "" |
$sign_key_pass = "" |
$SingleTo = false |
$smtp = NULL |
$SMTPAuth = false |
$SMTPDebug = false |
$SMTPKeepAlive = false |
$SMTPSecure = "" |
$Subject = '' |
$Timeout = 10 |
$to = array() |
$Username = 'abdullahbayraktar9' |
$Version = "2.0.4" |
$WordWrap = 0 |