Class $k.MailMessage
- Defined in: MailMessage.js
- Extends: $k.NetEntity
Constructor Attributes | Constructor Name and Description |
---|---|
Method Summary
Class Detail
$k.MailMessage()
Method Detail
-
{string[]} bcc()Get the blind carbon copy receivers ('bcc' field)
- Returns:
- {string[]}
-
{string[]} cc()Get the carbon copy receivers ('cc' field)
- Returns:
- {string[]}
-
headerCharset()Get the charset of the headers
-
{string[]} receiver()Get the receiver ('to' field)
- Returns:
- {string[]}
-
send(async)Send the mail, using the SMTP configuration of the volume
- Parameters:
- {boolean} async Optional
- True if the mail should be sent asynchronously, false if send() should block until the mail has been sent. Default is true.
-
{string[]} sender()Get the sender
- Returns:
- {string[]}
-
setBcc(receivers)Set the blind carbon copy receivers ('bcc' field)
- Parameters:
- receivers
- String or Array of strings
-
setCc(receivers)Set the carbon copy receivers ('cc' field)
- Parameters:
- receivers
- String or Array of strings
-
setHeaderCharset(charset)Set the charset of the headers
- Parameters:
- {string} charset
- Charset (encoding) of the headers
- Throws:
- {$k.exception.InvalidValue}
- If the charset is unknown
-
setReceiver(receivers)Set the receiver ('to' field)
- Parameters:
- receivers
- String or Array of strings
- Throws:
- {$k.exception.InvalidValue}
- If the value is not a valid receiver
-
setSender(sender)Set the sender ('from' field)
- Parameters:
- {string} sender
- Throws:
- {$k.exception.InvalidValue}
- If the value is not a valid sender
-
setSubject(subject)Set the subject
- Parameters:
- {string} subject
- Throws:
- {$k.exception.InvalidValue}
- If the value is not a valid subject
-
setUserName(username)Set the name of the user account. Required if the SMTP configuration requires authentication and more than one user is configured
- Parameters:
- {string} username
-
{string} subject()Get the subject
- Returns:
- {string}
-
{string} userName()Get the name of the user account
- Returns:
- {string}