Class: MailService

vertx-mail-js/mail_service~ MailService

new MailService()

smtp mail service for vert.x this Interface provides the methods to be used by the application program and is used to generate the service in other languages
Source:

Methods

sendMail(email, resultHandler) → {MailService}

send a single mail via MailService
Parameters:
Name Type Description
email Object MailMessage object containing the mail text, from/to, attachments etc
resultHandler function will be called when the operation is finished or it fails (may be null to ignore the result) the result JsonObject currently only contains {@code {"result":"success"}}
Source:
Returns:
this MailService instance so the method can be used fluently
Type
MailService

sendMailString(email, message, resultHandler) → {MailService}

send a single mail via MailService that has been pregenerated already

this makes it possible to create a mail message with Javamail for example to supports elements that are not supported by the mail encoder in vertx-mail-service

Parameters:
Name Type Description
email Object MailMessage object containing from/to etc, the message content fields are not evaluated
message string String object that contains the complete mail note that the From/To headers are not evaluated, rather they are taken from the MailMessage object
resultHandler function will be called when the operation is finished or it fails (may be null to ignore the result) the result JsonObject currently only contains {@code {"result":"success"}}
Source:
Returns:
this MailService instance so the method can be used fluently
Type
MailService

start()

start the MailServer instance if it is running locally (this operation is currently a no-op)
Source:

stop()

stop the MailServer instance if it is running locally

this operation shuts down the connection pool, doesn't wait for completion of the close operations when the mail service is running on the event bus, this operation has no effect

Source: