Doc
  • Get Started
  • Academy
  • Library
  • Languages iconEnglish
    • Português

›Resources

Libraries

  • Overview
  • Introduction

Resources & Objects

    Resources

    • App
    • Auth
    • Component
    • Config
    • Convert
    • CORS
    • Cron
    • Crypto
    • CSV
    • DB
    • Env
    • Error
    • Exec
    • Firebase
    • Form
    • Group
    • Header
    • HTML
    • Jasper
    • Jwt
    • Lang
    • Log
    • Monitor
    • OS
    • Out
    • PDF
    • RabbitMQ
    • Random
    • Remote
    • Form
    • Req
    • Res
    • Server
    • Setup
    • SMTP
    • Storage
    • Template
    • Time
    • Uid
    • Url
    • User
    • Val
    • WebSocket
    • XLS
    • XML

    Objects

    • Async
    • CheckExists
    • Column
    • DataItem
    • DataSchema
    • DBBatch
    • DBSearchResult
    • File
    • Index
    • InputStream
    • OSCommand
    • OutputStream
    • RandomString
    • RemoteResponse
    • Sequence
    • Service
    • SMTPConfig
    • Table
    • Values
    • XLSPosition

App Folders

  • Application folder structure
  • Config
  • DB
  • Public
  • Server
  • Storage
  • UI

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
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.


config


_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.


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 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
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.


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
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 andparallel.

Attributes
NAMETYPEDESCRIPTION
multipartSubtypestringThe multipart subtype.
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.


← SetupStorage →
  • attachment
  • config
  • getBcc
  • getCc
  • getConfig
  • getFrom
  • getHTML
  • getMultipartSubtype
  • getSubject
  • getSubjectPrefix
  • getText
  • getTo
  • init
  • isEnabled
  • send
  • setBcc
  • setCc
  • setConfig
  • setEnabled
  • setFrom
  • setHTML
  • setMultipartSubtype
  • setSubject
  • setSubjectPrefix
  • setText
  • setTo

Open Source

Download

admin@netuno.org

support@netuno.org

Copyright © Sitana 2022