Email

Spring Email Configuration

  • host - The server to connect to.
  • port - The port to connect to. Defaults to 25.
  • username - The email account to use to send emails from.
  • password - The password for the email account that is being used.
  • protocol - The protocol to use to send the email, i.e. SMTP, POP3, IMAP.
  • properties.mail.smtp - Mail properties if using SMTP.
    • auth - If true, attempt to authenticate the user using the AUTH command. Defaults to false.
    • starttls.enable - If true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must be configured so that the client will trust the server's certificate. Defaults to false.
    • ssl.trust - If set to "*", all hosts are trusted. If set to a whitespace separated list of hosts, those hosts are trusted. Otherwise, trust depends on the certificate the server presents.

Sample Spring Email configuration

 mail:
    host: smtp.gmail.com
    port: 587
    username: alpaca.alerts@email.com
    password: "emailPassword!"
    protocol: smtp
    properties.mail.smtp:
        auth: true
        starttls.enable: true
        ssl.trust: smtp.gmail.com

Alpaca Email Configuration

  • from - The email address to send emails from.
  • base-url - The URL of the Alpaca server that the emails will be sent from.

Sample Alpaca Email configuration

mail:
    from: alpaca.alerts@email.com
    base-url: http://127.0.0.1:8080