Skip to main content

SMTP

Resource of sending e-mail by SMTP.


attachment​


_smtp.attachment(name: string, type: string, file: File) : SMTP​

Description​

Add attachment file to e-mail.

Attributes​
NAMETYPEDESCRIPTION
namestringThe name of the attachment.
typestringThe content type of the attachment, for example image/png, text/html, application/zip, and many others...
fileFileThe 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​
NAMETYPEDESCRIPTION
namestringThe name of the attachment.
typestringThe content type of the attachment, for example image/png, text/html, application/zip, and many others...
fileFileThe file.
contentIdstringThe 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​
NAMETYPEDESCRIPTION
namestringThe name of the attachment.
typestringThe content type of the attachment, for example image/png, text/html, application/zip, and many others...
fileFileThe file.
contentIdstringThe attachment ID to be used in HTML content as <img src="cid:attachment"/>.
inlinebooleanWhether 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​
NAMETYPEDESCRIPTION
namestringThe name of the attachment.
typestringThe content type of the attachment, for example image/png, text/html, application/zip, and many others...
fileStorageThe 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​
NAMETYPEDESCRIPTION
namestringThe name of the attachment.
typestringThe content type of the attachment, for example image/png, text/html, application/zip, and many others...
fileStorageThe file.
contentIdstringThe 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​
NAMETYPEDESCRIPTION
namestringThe name of the attachment.
typestringThe content type of the attachment, for example image/png, text/html, application/zip, and many others...
fileStorageThe file.
contentIdstringThe attachment ID to be used in HTML content as <img src="cid:attachment"/>.
inlinebooleanWhether 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​
NAMETYPEDESCRIPTION
bccstringThe 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​
NAMETYPEDESCRIPTION
ccstringThe 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​
NAMETYPEDESCRIPTION
configValuesConfiguration 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​
NAMETYPEDESCRIPTION
configSMTPConfigDefinition 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​

Description​

Checks if it is enabled.

Return​

( boolean )

Result whether or not it is activated.


_smtp.enabled(enabled: boolean) : SMTP​

Description​

Sets whether it is enabled.

Attributes​
NAMETYPEDESCRIPTION
enabledbooleanWhether 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​
NAMETYPEDESCRIPTION
fromstringThe 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.


getKey​


_smtp.getKey() : string​

Description​

Obtain the SMTP configuration key that is being used.

Return​

( string )

Name of the SMTP configuration key being used.


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​

Description​

Gets the HTML of the e-mail body.

Return​

( string )

The HTML that will go in the e-mail.


_smtp.html(html: string) : SMTP​

Description​

Defines the HTML of the e-mail body.

Attributes​
NAMETYPEDESCRIPTION
htmlstringThe HTML that will go in the e-mail.
Return​

( SMTP )

Current SMTP object.


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​
NAMETYPEDESCRIPTION
configKeystringKey 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​
NAMETYPEDESCRIPTION
configSMTPConfigConfiguration 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.


key​


_smtp.key() : string​

Description​

Obtain the SMTP configuration key that is being used.

Return​

( string )

Name of the SMTP configuration key being used.


mail​


_smtp.mail() : org.netuno.psamata.mail.Mail​

Return​

( org.netuno.psamata.mail.Mail )


multipartSubtype​


_smtp.multipartSubtype() : string​

Description​

Gets the multipart subtype such as mixed, alternative, digest and parallel.

Return​

( string )

The multipart subtype.


_smtp.multipartSubtype(multipartSubtype: string) : SMTP​

Description​

Defines the multipart subtype such as mixed, alternative, digest and parallel.

Attributes​
NAMETYPEDESCRIPTION
multipartSubtypestringThe multipart subtype.
Return​

( SMTP )

Current SMTP object.


replyTo​


_smtp.replyTo() : string​

Description​

Gets who should receive the email reply.

Return​

( string )

The e-mail of who will receive the e-mail as a reply.


_smtp.replyTo(replyTo: string) : SMTP​

Description​

Defines who should be replied to the email.

Attributes​
NAMETYPEDESCRIPTION
replyTostringThe e-mail of who will receive the e-mail as a reply.
Return​

( SMTP )

Current SMTP object.


send​


_smtp.send() : void​

Description​

Performs the sending of the e-mail.

Return​

( void )


_smtp.send(mail: org.netuno.psamata.mail.Mail) : void​

Attributes​
NAMETYPEDESCRIPTION
mailorg.netuno.psamata.mail.Mail
Return​

( void )


setBcc​


_smtp.setBcc(bcc: string) : SMTP​

Description​

Defines who receives a hidden copy of the e-mail.

Attributes​
NAMETYPEDESCRIPTION
bccstringThe 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​
NAMETYPEDESCRIPTION
ccstringThe 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​
NAMETYPEDESCRIPTION
configSMTPConfigDefinition of the new configuration.
Return​

( SMTP )

Current SMTP object.


setEnabled​


_smtp.setEnabled(enabled: boolean) : SMTP​

Description​

Sets whether it is enabled.

Attributes​
NAMETYPEDESCRIPTION
enabledbooleanWhether 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​
NAMETYPEDESCRIPTION
fromstringThe 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​
NAMETYPEDESCRIPTION
htmlstringThe 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​
NAMETYPEDESCRIPTION
multipartSubtypestringThe multipart subtype.
Return​

( SMTP )

Current SMTP object.


setReplyTo​


_smtp.setReplyTo(replyTo: string) : SMTP​

Description​

Defines who should be replied to the email.

Attributes​
NAMETYPEDESCRIPTION
replyTostringThe 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​
NAMETYPEDESCRIPTION
subjectstringThe 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​
NAMETYPEDESCRIPTION
subjectPrefixstringThe 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​
NAMETYPEDESCRIPTION
textstringThe 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​
NAMETYPEDESCRIPTION
tostringThe 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​
NAMETYPEDESCRIPTION
subjectstringThe title that will go in the e-mail.
Return​

( SMTP )

Current SMTP object.


subjectPrefix​


_smtp.subjectPrefix() : string​

Description​

Gets the prefix of the e-mail title.

Return​

( string )

The prefix of the title that will go in the e-mail.


_smtp.subjectPrefix(subjectPrefix: string) : SMTP​

Description​

Defines the prefix of the e-mail title.

Attributes​
NAMETYPEDESCRIPTION
subjectPrefixstringThe prefix of the title that will go in the e-mail.
Return​

( SMTP )

Current SMTP object.


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​
NAMETYPEDESCRIPTION
textstringThe 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​
NAMETYPEDESCRIPTION
tostringThe recipient's e-mail address.
Return​

( SMTP )

Current SMTP object.


with​


_smtp.with(imap: IMAP) : SMTP​

Attributes​
NAMETYPEDESCRIPTION
imapIMAP
Return​

( SMTP )