PHPMailer.Lite.php

Note, only items with public or protected scope are documented.

Project
see https://sourceforge.net/projects/phpmailer-lite/
category Email Transport
package PHPMailer Lite
author Andy Prevost
copyright 2004-2023 © Andy Prevost - All Rights Reserved
version 2024.1.2.1
license MIT - Distributed under the MIT License
namespace codeworxtech\PHPMailerLite;
class PHPMailerLite
Properties
scope property default value comments
const VERSION '2024.1.2.1'  
const CRLF "\r\n"  
const EOL "\n"  
const MAILSEP ", "  
const TIMEVAL 30;  
public $debug NULL debug has a cap
public $hostname  
public $imapAddToSent false  
public $imapHost  
public $imapPort 143/imap/notls  
public $imapUsername  
public $imapPassword  
public $messageICal  
public $messageHTML  
public $messageText  
public $mimeMail  
public $priority 0  
public $returnPath  
public $subject  
public $useIMAP false  
public $useSMTP true  
public $smtpAccount []  
public $smtpDebug false  
public $smtpDomain  
public $smtpFrom  
public $smtpHost  
public $smtpKeepAlive false  
public $smtpOptions [];  
public $smtpPassword  
public $smtpPort  
public $smtpUsername  
public $smtpUseverp false  
Methods
scope function params comments
__construct  
public AddAttachment $path, $name = '', $encoding = 'base64', $type = '' Adds an attachment from a path on the filesystem.
Returns false if the file could not be found
or accessed.
@param string $path Path to the attachment.
@param string $name Overrides the attachment name.
@param string $encoding File encoding (see $Encoding).
@param string $type File extension (MIME) type.
@return bool
public AddBCC $param Add a BCC
@param string $bcc
public AddCC $param Add a CC
@param string $cc
public AddCustomHeader $custom_header Adds a custom header
public AddMessageToSent $folder = "INBOX.Sent", $options = null Adds email message to IMAP INBOX.Sent
@param string $message (optional)
@param string $folder (optional)
@param string $options (optional)
public AddRecipient $param Add a recipient
@param string $email
public AddStringAttachment $string, $filename, $encoding = 'base64', $type = '' 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.
@param string $string String attachment data.
@param string $filename Name of the attachment.
@param string $encoding File encoding (see $Encoding).
@param string $type File extension (MIME) type.
@return void
public BuildHeader $type="" Builds message header
@return string
protected GetMsgPart $bkey = "" Builds plain text and HTML portion of message
@return string
protected GetMsgType $type = '' Gets email message type
@return string
protected IsExploitPath $path Check file path for possible exploits and vulnerabilities.
- exploits: LFI/File manipulation, Directory traversal, File disclosure, Encoding, RCE
@param string $path Relative or absolute path to a file
@return bool
protected IsPathSafe $path Check if file path is safe (real, accessible, not executable).
@param string $path Relative or absolute path to a file
@return bool
protected IsShellSafe $str Prevent attacks by disallowing unsafe shell characters.
Modified version (Thanks to Paul Buonopane )
@param string $string (the string to be tested for shell safety)
@return bool
public Send $via = 'smtp' Send the email
@return bool
protected TransportIMAP $hdr, $body Security to ALL the data and email addresses
must occur BEFORE calling this function
@return bool
protected TransportSendmail $body Security to ALL the data and email addresses
must occur BEFORE calling this function
@return bool
protected TransportSMTP $hdr, $body Security to ALL the data and email addresses
must occur BEFORE calling this function
@return bool
public SetAddParams $params Set additional parameter for mail() function
@param string $parameter
@return void
public SetBodyText $content Set plain text
@param string $content
public SetConfirmRead $param Set email address for confirm email is read
@param string $email The email address
public SetConfirmReceipt $param Set email address for confirm email is received
@param string $email The email address
public SetPriority $param Set priority
@param integer $param - from 1 (highest) to 5 (lowest)
@return bool
public AddReplyTo $param Set replyTo
@param string $email
@return bool
public SetSender $param Set sender
@param mixed (string or array) $email/$name
public SetSubject $subject Set subject
@param string $subject The subject of the email
public useSMTP $param = true Uses SMTP transport by default, set to false to use Sendmail as default
@param bool
public useIMAP $param = true Uses SMTP transport by default, set to false to use Sendmail as default
@param bool
public WrapText $message, $length Wraps message for use with mailers that do not automatically
perform wrapping
@param string $message The message to wrap
@param integer $length The line length to wrap to
@return string
public SetSMTPaccount $array Sets SMTP Account (Username and password)
@return mixed
public SetSMTPhost $param Set SMTP host
@param string $param
public SetSMTPport $param Set SMTP port
@param integer $param
public SetSMTPpass $param Set SMTP password
@param string $param
public SetSMTPuser $param Set SMTP username
@param string $param
public ThrowResponse $code, $desc, $data, $success = true  

Created using codeworxtech\PHPClassDocumentor by Andy Prevost.