SMTP
Feature of sending e-mail by SMTP.
attachment
_smtp.attachment(name: string, type: string, file: File) : SMTP
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.
_smtp.attachment(name: string, type: string, file: File, contentId: string) : SMTP
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.
_smtp.attachment(name: string, type: string, file: File, contentId: string, inline: boolean) : SMTP
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.
_smtp.attachment(name: string, type: string, file: Storage) : SMTP
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 | Storage | The file. |
Return
( SMTP )
Current SMTP object.
_smtp.attachment(name: string, type: string, file: Storage, contentId: string) : SMTP
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 | Storage | The file. |
contentId | string | The attachment ID to be used in HTML content as <img src="cid:attachment"/> . |
Return
( SMTP )
Current SMTP object.
_smtp.attachment(name: string, type: string, file: Storage, contentId: string, inline: boolean) : SMTP
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 | Storage | 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.
bcc
_smtp.bcc() : 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.
_smtp.bcc(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.
cc
_smtp.cc() : 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.
_smtp.cc(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.
config
_smtp.config() : SMTPConfig
Description
Starts a new configuration of its own.
Return
( SMTPConfig )
Configuration object loaded from received data.
_smtp.config(config: Values) : SMTPConfig
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.
_smtp.config(config: SMTPConfig) : SMTP
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.
emptyMail
_smtp.emptyMail() : org.netuno.psamata.mail.Mail
Return
( org.netuno.psamata.mail.Mail )
enabled
_smtp.enabled() : boolean
Return
( boolean )
_smtp.enabled(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.
from
_smtp.from() : string
Description
Gets the sender's e-mail address.
Return
( string )
The e-mail address of the sender.
_smtp.from(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.
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
_smtp.getConfig() : SMTPConfig
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
and parallel
.
Return
( string )
The multipart subtype.
getReplyTo
_smtp.getReplyTo() : string
Description
Gets who should receive the email reply.
Return
( string )
The e-mail of who will receive the e-mail as a reply.
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.
html
_smtp.html() : string
Return
( string )
_smtp.html(html: string) : SMTP
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
html | string |
Return
( SMTP )
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.
_smtp.init(config: SMTPConfig) : SMTP
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.
mail
_smtp.mail() : org.netuno.psamata.mail.Mail
Return
( org.netuno.psamata.mail.Mail )
multipartSubtype
_smtp.multipartSubtype() : string
Return
( string )
_smtp.multipartSubtype(html: string) : SMTP
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
html | string |
Return
( SMTP )
replyTo
_smtp.replyTo() : string
Return
( string )
_smtp.replyTo(replyTo: string) : SMTP
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
replyTo | string |
Return
( SMTP )
send
_smtp.send() : void
Description
Performs the sending of the e-mail.
Return
( void )
_smtp.send(mail: org.netuno.psamata.mail.Mail) : void
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
org.netuno.psamata.mail.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
_smtp.setConfig(config: SMTPConfig) : SMTP
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
and parallel
.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
multipartSubtype | string | The multipart subtype. |
Return
( SMTP )
Current SMTP object.
setReplyTo
_smtp.setReplyTo(replyTo: string) : SMTP
Description
Defines who should be replied to the email.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
replyTo | string | The e-mail of who will receive the e-mail as a reply. |
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.
subject
_smtp.subject() : string
Description
Gets the title of the email.
Return
( string )
The title that will go in the e-mail.
_smtp.subject(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.
subjectPrefix
_smtp.subjectPrefix() : string
Return
( string )
_smtp.subjectPrefix(subjectPrefix: string) : SMTP
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
subjectPrefix | string |
Return
( SMTP )
text
_smtp.text() : string
Description
Gets the body text of the e-mail.
Return
( string )
The text that will go in the e-mail.
_smtp.text(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.
to
_smtp.to() : string
Description
Gets the recipient's e-mail address.
Return
( string )
The recipient's e-mail address.
_smtp.to(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.
with
_smtp.with(imap: IMAP) : SMTP
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
imap | IMAP |
Return
( SMTP )