This site is no longer updated.Go to new Conversational Cloud docs

$mail.config


This method configures the settings of the SMTP server that will be used for sending email messages via the $mail.sendMessage method.

Syntax

The method accepts six arguments:

Argument Type Description
smtpHost String SMTP server host.
smtpPort Number SMTP server port.
user String SMTP server user.
password String SMTP server password.
from String Email sender.
hiddenCopy String or string array Email hidden copy recipient or list of recipients. This argument is optional.
$mail.config(
    "smtp.just-ai.com", // Host
    2525, // Port
    "user@just-ai.com", // User
    $secrets.get("smtpPassword"), // Password
    "bot@just-ai.com", // Sender
    "admin@just-ai.com" // Hidden copy recipient
    // ["admin@just-ai.com", "support@just-ai.com"] // List of hidden copy recipients
);

The settings will be used for all subsequent calls to the $mail.sendMessage method, until overridden by another $mail.config call.