Skip to content

Kirby 3.6.6

new PHPMailer()

Email constructor

new PHPMailer(array $props = [ ], bool $debug = false)

Parameters

Name Type Default
$props array [ ]
$debug bool false

For the $props parameter, you pass an array with the following data, which will be used to set up the Kirby\Email\PHPMailer object:

Name Type Description
attachments array Sets the email attachments
bcc string|array Sets "bcc" recipients
beforeSend Closure Sets the "beforeSend" callback
body * string|array Sets the email body
cc string|array Sets "cc" recipients
from * string Sets the "from" email address
fromName string Sets the "from" name
replyTo string Sets the "reply to" email address
replyToName string Sets the "reply to" name
subject * string Sets the email subject
to * string|array Sets the recipients of the email
transport array Sets the email transport settings

Parent class

Kirby\Email\PHPMailer inherited from Kirby\Email\Email