SMTP
Feature of sending e-mail by SMTP.
attachment
File) : SMTP
_smtp.attachment(name: string, type: string, file:Description
Add attachment file to e-mail.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
name | string | The name of the attachment. |
type | string | The content type of the attachment, for example image/png, text/html, application/zip, and many others... |
file | File | The file. |
Return
( SMTP )
Current SMTP object.
File, contentId: string) : SMTP
_smtp.attachment(name: string, type: string, file:Description
Add attachment file to e-mail.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
name | string | The name of the attachment. |
type | string | The content type of the attachment, for example image/png, text/html, application/zip, and many others... |
file | File | The file. |
contentId | string | The attachment ID to be used in HTML content as <img src="cid:attachment"/> . |
Return
( SMTP )
Current SMTP object.
File, contentId: string, inline: boolean) : SMTP
_smtp.attachment(name: string, type: string, file:Description
Add attachment file to e-mail.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
name | string | The name of the attachment. |
type | string | The content type of the attachment, for example image/png, text/html, application/zip, and many others... |
file | File | The file. |
contentId | string | The attachment ID to be used in HTML content as <img src="cid:attachment"/> . |
inline | boolean | Whether or not to be injected into the content. |
Return
( SMTP )
Current SMTP object.
config
Values) : SMTPConfig
_smtp.config(config:Description
Starts a new configuration of its own.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
config | Values | Configuration definition data structure. |
Return
( SMTPConfig )
Configuration object loaded from received data.
getBcc
_smtp.getBcc() : string
Description
Gets whoever receives a hidden copy of the e-mail.
Return
( string )
The e-mail of who will receive the e-mail as a blind copy.
getCc
_smtp.getCc() : string
Description
Gets whoever receives a copy of the e-mail.
Return
( string )
The e-mail of who will receive the e-mail as a copy.
getConfig
SMTPConfig
_smtp.getConfig() :Description
Gets the configuration that is being used.
Return
( SMTPConfig )
Object of the active configuration.
getFrom
_smtp.getFrom() : string
Description
Gets the sender's e-mail address.
Return
( string )
The e-mail address of the sender.
getHTML
_smtp.getHTML() : string
Description
Gets the HTML of the e-mail body.
Return
( string )
The HTML that will go in the e-mail.
getMultipartSubtype
_smtp.getMultipartSubtype() : string
Description
Gets the multipart subtype such as mixed
,alternative
, digest
andparallel
.
Return
( string )
The multipart subtype.
getSubject
_smtp.getSubject() : string
Description
Gets the title of the email.
Return
( string )
The title that will go in the e-mail.
getSubjectPrefix
_smtp.getSubjectPrefix() : string
Description
Gets the prefix of the e-mail title.
Return
( string )
The prefix of the title that will go in the e-mail.
getText
_smtp.getText() : string
Description
Gets the body text of the e-mail.
Return
( string )
The text that will go in the e-mail.
getTo
_smtp.getTo() : string
Description
Gets the recipient's e-mail address.
Return
( string )
The recipient's e-mail address.
init
_smtp.init() : SMTP
Description
Starts a new instance of SMTP using the STMP configuration of the default
key.
Return
( SMTP )
The new instance of the SMTP resource based on the default
STMP configuration.
_smtp.init(configKey: string) : SMTP
Description
Starts a new instance of SMTP from a specific configuration.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
configKey | string | Key of the SMTP configuration that will be used. |
Return
( SMTP )
The new instance of the SMTP resource based on the specified SMTP configuration.
SMTPConfig) : SMTP
_smtp.init(config:Description
Starts a new instance of SMTP from a configuration that is defined in its own configuration object.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
config | SMTPConfig | Configuration that will be used. |
Return
( SMTP )
The new instance of the SMTP resource based on the defined configuration.
isEnabled
_smtp.isEnabled() : boolean
Description
Checks if it is enabled.
Return
( boolean )
Result whether or not it is activated.
send
_smtp.send() : void
Description
Performs the sending of the e-mail.
Return
( void )
setBcc
_smtp.setBcc(bcc: string) : SMTP
Description
Defines who receives a hidden copy of the e-mail.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
bcc | string | The e-mail of who will receive the e-mail as a blind copy. |
Return
( SMTP )
Current SMTP object.
setCc
_smtp.setCc(cc: string) : SMTP
Description
Defines who receives a copy of the e-mail.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
cc | string | The e-mail of who will receive the e-mail as a copy. |
Return
( SMTP )
Current SMTP object.
setConfig
SMTPConfig) : SMTP
_smtp.setConfig(config:Description
Define outra configuração que deve ser utilizada.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
config | SMTPConfig | Definition of the new configuration. |
Return
( SMTP )
Current SMTP object.
setEnabled
_smtp.setEnabled(enabled: boolean) : SMTP
Description
Sets whether it is enabled.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
enabled | boolean | Whether it is active or inactive. |
Return
( SMTP )
Current SMTP object.
setFrom
_smtp.setFrom(from: string) : SMTP
Description
Sets the sender's e-mail address.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
from | string | The e-mail address of the sender. |
Return
( SMTP )
Current SMTP object.
setHTML
_smtp.setHTML(html: string) : SMTP
Description
Defines the HTML of the e-mail body.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
html | string | The HTML that will go in the e-mail. |
Return
( SMTP )
Current SMTP object.
setMultipartSubtype
_smtp.setMultipartSubtype(multipartSubtype: string) : SMTP
Description
Defines the multipart subtype such as mixed
,alternative
, digest
andparallel
.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
multipartSubtype | string | The multipart subtype. |
Return
( SMTP )
Current SMTP object.
setSubject
_smtp.setSubject(subject: string) : SMTP
Description
Sets the title of the e-mail.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
subject | string | The title that will go in the e-mail. |
Return
( SMTP )
Current SMTP object.
setSubjectPrefix
_smtp.setSubjectPrefix(subjectPrefix: string) : SMTP
Description
Defines the prefix of the e-mail title.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
subjectPrefix | string | The prefix of the title that will go in the e-mail. |
Return
( SMTP )
Current SMTP object.
setText
_smtp.setText(text: string) : SMTP
Description
Defines the body text of the e-mail.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
text | string | The text that will go in the e-mail. |
Return
( SMTP )
Current SMTP object.
setTo
_smtp.setTo(to: string) : SMTP
Description
Sets the recipient's e-mail address.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
to | string | The recipient's e-mail address. |
Return
( SMTP )
Current SMTP object.