new $k.MailMessage()
A mail message
Extends
Methods
bcc() : Array.<string>
Get the blind carbon copy receivers ('bcc' field)
Returns:
| Type | Description | 
|---|---|
| Array.<string> | 
cc() : Array.<string>
Get the carbon copy receivers ('cc' field)
Returns:
| Type | Description | 
|---|---|
| Array.<string> | 
headerCharset()
Get the charset of the headers
receiver() : Array.<string>
Get the receiver ('to' field)
Returns:
| Type | Description | 
|---|---|
| Array.<string> | 
send(async)
Send the mail, using the SMTP configuration of the volume
| Name | Type | Description | 
|---|---|---|
async | 
            
            
            boolean | 
                
                    
                        optional
                    
                    
                        
                    
                
                 True if the mail should be sent asynchronously, false if send() should block until the mail has been sent. Default is true.  | 
        
sender() : Array.<string>
Get the sender
Returns:
| Type | Description | 
|---|---|
| Array.<string> | 
setBcc(receivers)
Set the blind carbon copy receivers ('bcc' field)
| Name | Type | Description | 
|---|---|---|
receivers | 
            
            
            
                
                 String or Array of strings  | 
        
setCc(receivers)
Set the carbon copy receivers ('cc' field)
| Name | Type | Description | 
|---|---|---|
receivers | 
            
            
            
                
                 String or Array of strings  | 
        
setHeaderCharset(charset)
Set the charset of the headers
| Name | Type | Description | 
|---|---|---|
charset | 
            
            
            string | 
                
                 Charset (encoding) of the headers  | 
        
Throws:
| Type | Description | 
|---|---|
| $k.exception.InvalidValue | If the charset is unknown  | 
            
setReceiver(receivers)
Set the receiver ('to' field)
| Name | Type | Description | 
|---|---|---|
receivers | 
            
            
            
                
                 String or Array of strings  | 
        
Throws:
| Type | Description | 
|---|---|
| $k.exception.InvalidValue | If the value is not a valid receiver  | 
            
setSender(sender)
Set the sender ('from' field)
| Name | Type | Description | 
|---|---|---|
sender | 
            
            
            string | 
Throws:
| Type | Description | 
|---|---|
| $k.exception.InvalidValue | If the value is not a valid sender  | 
            
setSubject(subject)
Set the subject
| Name | Type | Description | 
|---|---|---|
subject | 
            
            
            string | 
Throws:
| Type | Description | 
|---|---|
| $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
| Name | Type | Description | 
|---|---|---|
username | 
            
            
            string | 
subject() : string
Get the subject
Returns:
| Type | Description | 
|---|---|
| string | 
userName() : string
Get the name of the user account
Returns:
| Type | Description | 
|---|---|
| string |