VatcomNewReportToSubmitNotification
extends SimpleMail
in package
Table of Contents
Properties
- $attachments : array<string|int, mixed>
- The attachments for the message.
- $bcc : array<string|int, mixed>
- The "bcc" recipients of the message.
- $cc : array<string|int, mixed>
- The "cc" recipients of the message.
- $from : array<string|int, mixed>
- The person the message is from.
- $rawAttachments : array<string|int, mixed>
- The raw attachments for the message.
- $replyTo : array<string|int, mixed>
- The "reply to" recipients of the message.
- $subject : string
- The subject of the message.
- $textView : string
- The plain text view to use for the message.
- $theme : string
- The name of the theme (css) file which will be used to style the mail.
- $to : array<string|int, mixed>
- The "to" recipients of the message.
- $view : string
- The view to use for the message.
- $viewData : array<string|int, mixed>
- The view data for the message.
- $button : null|array<string|int, mixed>
- $html : string
- The HTML to use for the message.
- $isEnabledForSubAccounts : bool
- $optional : null|array<string|int, mixed>
- $templateLang : string
Methods
- __construct() : mixed
- SimpleMail constructor.
- addBccEmail() : void
- addOptional() : mixed
- attach() : $this
- Attach a file to the message.
- attachData() : $this
- Attach in-memory data as an attachment.
- bcc() : $this
- Set the recipients of the message.
- build() : mixed
- cc() : $this
- Set the recipients of the message.
- clearRecipients() : mixed
- from() : $this
- Set the sender of the message.
- fromNotification() : SimpleMail
- getButton() : mixed
- Get the value of button
- getOpt() : array<string|int, mixed>|null
- getOptional() : mixed
- getProtocolAndHost() : mixed
- getSecondSendGridTemplateId() : string|null
- getSendGridTemplateId() : string
- getSubject() : string
- hasBcc() : bool
- Determine if the given recipient is set on the mailable.
- hasCc() : bool
- Determine if the given recipient is set on the mailable.
- hasFrom() : bool
- Determine if the given recipient is set on the mailable.
- hasReplyTo() : bool
- Determine if the given recipient is set on the mailable.
- hasTo() : bool
- Determine if the given recipient is set on the mailable.
- html() : $this
- Set the rendered HTML content for the message.
- isEnabled() : bool
- isUseSecondSendGridAccount() : bool
- replyTo() : $this
- Set the "reply to" address of the message.
- send() : mixed
- setButton() : $this
- setIsEnabled() : void
- setSecondSendGridTemplateId() : void
- setSendGridTemplateId() : void
- setUseSecondSendGridAccount() : void
- setView() : $this
- setViewName() : $this
- subject() : $this
- Set the subject of the message.
- text() : $this
- Set the plain text view for the message.
- theme() : $this
- Set the name of the theme (css) file which will be used to style the mail.
- to() : $this
- Set the recipients of the message.
- view() : $this
- Set the view and view data for the message.
- with() : $this
- Set the view data for the message.
- addressesToArray() : array<string|int, mixed>
- Convert the given recipient arguments to an array.
- buildAttachments() : $this
- Add all of the attachments to the message.
- buildFrom() : $this
- Add the sender to the message.
- buildRecipients() : $this
- Add all of the recipients to the message.
- buildSubject() : $this
- Set the subject for the message.
- buildView() : array<string|int, mixed>|string
- Build the view for the message.
- extractClientTextId() : mixed
- extractFirstName() : string
- extractFullName() : string
- getMailableSubaccounts() : array<string|int, mixed>
- getTemplateLanguage() : mixed
- hasRecipient() : bool
- Determine if the given recipient is set on the mailable.
- normalizeRecipient() : object
- Convert the given recipient into an object.
- setAddress() : $this
- Set the recipients of the message.
- tryExtractUserAccount() : mixed
Properties
$attachments
The attachments for the message.
public
array<string|int, mixed>
$attachments
= []
$bcc
The "bcc" recipients of the message.
public
array<string|int, mixed>
$bcc
= []
$cc
The "cc" recipients of the message.
public
array<string|int, mixed>
$cc
= []
$from
The person the message is from.
public
array<string|int, mixed>
$from
= []
$rawAttachments
The raw attachments for the message.
public
array<string|int, mixed>
$rawAttachments
= []
$replyTo
The "reply to" recipients of the message.
public
array<string|int, mixed>
$replyTo
= []
$subject
The subject of the message.
public
string
$subject
$textView
The plain text view to use for the message.
public
string
$textView
$theme
The name of the theme (css) file which will be used to style the mail.
public
string
$theme
= 'basic'
$to
The "to" recipients of the message.
public
array<string|int, mixed>
$to
= []
$view
The view to use for the message.
public
string
$view
$viewData
The view data for the message.
public
array<string|int, mixed>
$viewData
= []
$button
protected
null|array<string|int, mixed>
$button
= null
$html
The HTML to use for the message.
protected
string
$html
$isEnabledForSubAccounts
protected
bool
$isEnabledForSubAccounts
= false
$optional
protected
null|array<string|int, mixed>
$optional
= null
$templateLang
protected
string
$templateLang
Methods
__construct()
SimpleMail constructor.
public
__construct(mixed $user, array<string|int, mixed> $opt) : mixed
Parameters
- $user : mixed
- $opt : array<string|int, mixed>
addBccEmail()
public
addBccEmail() : void
addOptional()
public
addOptional(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
attach()
Attach a file to the message.
public
attach(string $file[, array<string|int, mixed> $options = [] ]) : $this
Options: as - filename mime - mimetype
Parameters
- $file : string
- $options : array<string|int, mixed> = []
Return values
$thisattachData()
Attach in-memory data as an attachment.
public
attachData(string $data, string $name[, array<string|int, mixed> $options = [] ]) : $this
Parameters
- $data : string
- $name : string
- $options : array<string|int, mixed> = []
Return values
$thisbcc()
Set the recipients of the message.
public
bcc(object|array<string|int, mixed>|string $address[, string|null $name = null ]) : $this
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
Return values
$thisbuild()
public
final build() : mixed
cc()
Set the recipients of the message.
public
cc(object|array<string|int, mixed>|string $address[, string|null $name = null ]) : $this
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
Return values
$thisclearRecipients()
public
clearRecipients() : mixed
from()
Set the sender of the message.
public
from(object|array<string|int, mixed>|string $address[, string|null $name = null ]) : $this
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
Return values
$thisfromNotification()
public
static fromNotification(Notification $notification, Translator $translator) : SimpleMail
Parameters
- $notification : Notification
- $translator : Translator
Return values
SimpleMailgetButton()
Get the value of button
public
getButton() : mixed
getOpt()
public
getOpt() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetOptional()
public
getOptional() : mixed
getProtocolAndHost()
public
getProtocolAndHost() : mixed
getSecondSendGridTemplateId()
public
getSecondSendGridTemplateId() : string|null
Return values
string|nullgetSendGridTemplateId()
public
getSendGridTemplateId() : string
Return values
stringgetSubject()
public
getSubject() : string
Return values
stringhasBcc()
Determine if the given recipient is set on the mailable.
public
hasBcc(object|array<string|int, mixed>|string $address[, string|null $name = null ]) : bool
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
Return values
boolhasCc()
Determine if the given recipient is set on the mailable.
public
hasCc(object|array<string|int, mixed>|string $address[, string|null $name = null ]) : bool
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
Return values
boolhasFrom()
Determine if the given recipient is set on the mailable.
public
hasFrom(object|array<string|int, mixed>|string $address[, string|null $name = null ]) : bool
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
Return values
boolhasReplyTo()
Determine if the given recipient is set on the mailable.
public
hasReplyTo(object|array<string|int, mixed>|string $address[, string|null $name = null ]) : bool
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
Return values
boolhasTo()
Determine if the given recipient is set on the mailable.
public
hasTo(object|array<string|int, mixed>|string $address[, string|null $name = null ]) : bool
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
Return values
boolhtml()
Set the rendered HTML content for the message.
public
html(string $html) : $this
Parameters
- $html : string
Return values
$thisisEnabled()
public
isEnabled() : bool
Return values
boolisUseSecondSendGridAccount()
public
isUseSecondSendGridAccount() : bool
Return values
boolreplyTo()
Set the "reply to" address of the message.
public
replyTo(object|array<string|int, mixed>|string $address[, string|null $name = null ]) : $this
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
Return values
$thissend()
public
send(Mailer $mailer) : mixed
Parameters
- $mailer : Mailer
setButton()
public
setButton(string $text, string $href[, bool $hostCompletion = false ]) : $this
Parameters
- $text : string
- $href : string
- $hostCompletion : bool = false
Return values
$thissetIsEnabled()
public
setIsEnabled(bool $isEnabled) : void
Parameters
- $isEnabled : bool
setSecondSendGridTemplateId()
public
setSecondSendGridTemplateId(string $secondSendGridTemplateId) : void
Parameters
- $secondSendGridTemplateId : string
setSendGridTemplateId()
public
setSendGridTemplateId(string $sendGridTemplateId) : void
Parameters
- $sendGridTemplateId : string
setUseSecondSendGridAccount()
public
setUseSecondSendGridAccount(bool $useSecondSendGridAccount) : void
Parameters
- $useSecondSendGridAccount : bool
setView()
public
setView(string $view) : $this
Parameters
- $view : string
Return values
$thissetViewName()
public
setViewName(string $viewName) : $this
Parameters
- $viewName : string
Return values
$thissubject()
Set the subject of the message.
public
subject(string $subject) : $this
Parameters
- $subject : string
Return values
$thistext()
Set the plain text view for the message.
public
text(string $textView[, array<string|int, mixed> $data = [] ]) : $this
Parameters
- $textView : string
- $data : array<string|int, mixed> = []
Return values
$thistheme()
Set the name of the theme (css) file which will be used to style the mail.
public
theme([string $theme = 'basic' ]) : $this
Parameters
- $theme : string = 'basic'
Return values
$thisto()
Set the recipients of the message.
public
to(object|array<string|int, mixed>|string $address[, string|null $name = null ]) : $this
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
Return values
$thisview()
Set the view and view data for the message.
public
view(string $view[, array<string|int, mixed> $data = [] ]) : $this
Parameters
- $view : string
- $data : array<string|int, mixed> = []
Return values
$thiswith()
Set the view data for the message.
public
with(string|array<string|int, mixed> $key[, mixed $value = null ]) : $this
Parameters
- $key : string|array<string|int, mixed>
- $value : mixed = null
Return values
$thisaddressesToArray()
Convert the given recipient arguments to an array.
protected
addressesToArray(object|array<string|int, mixed>|string $address[, string|null $name = null ]) : array<string|int, mixed>
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
Return values
array<string|int, mixed>buildAttachments()
Add all of the attachments to the message.
protected
buildAttachments(Message $message) : $this
Parameters
- $message : Message
Return values
$thisbuildFrom()
Add the sender to the message.
protected
buildFrom(Message $message) : $this
Parameters
- $message : Message
Return values
$thisbuildRecipients()
Add all of the recipients to the message.
protected
buildRecipients(Message $message) : $this
Parameters
- $message : Message
Return values
$thisbuildSubject()
Set the subject for the message.
protected
buildSubject(Message $message) : $this
Parameters
- $message : Message
Return values
$thisbuildView()
Build the view for the message.
protected
buildView() : array<string|int, mixed>|string
Return values
array<string|int, mixed>|stringextractClientTextId()
protected
extractClientTextId(mixed $user) : mixed
Parameters
- $user : mixed
extractFirstName()
protected
extractFirstName(mixed $user) : string
Parameters
- $user : mixed
-
[optional] $default = $this->user = null
Return values
string —$default = "Customer"
extractFullName()
protected
extractFullName(mixed $user) : string
Parameters
- $user : mixed
-
[optional] $default = $this->user = null
Return values
string —$default = "Customer"
getMailableSubaccounts()
protected
getMailableSubaccounts(UserAccount $userAccount) : array<string|int, mixed>
Parameters
- $userAccount : UserAccount
Return values
array<string|int, mixed>getTemplateLanguage()
protected
getTemplateLanguage() : mixed
hasRecipient()
Determine if the given recipient is set on the mailable.
protected
hasRecipient(object|array<string|int, mixed>|string $address[, string|null $name = null ][, string $property = 'to' ]) : bool
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
- $property : string = 'to'
Return values
boolnormalizeRecipient()
Convert the given recipient into an object.
protected
normalizeRecipient(mixed $recipient) : object
Parameters
- $recipient : mixed
Return values
objectsetAddress()
Set the recipients of the message.
protected
setAddress(object|array<string|int, mixed>|string $address[, string|null $name = null ][, string $property = 'to' ]) : $this
All recipients are stored internally as [['name' => ?, 'address' => ?]]
Parameters
- $address : object|array<string|int, mixed>|string
- $name : string|null = null
- $property : string = 'to'
Return values
$thistryExtractUserAccount()
protected
tryExtractUserAccount(mixed $user) : mixed
Parameters
- $user : mixed