SMTP settings¶
A configured SMTP is necessary for features such as user-initiated sign-up, password reset, notifications about changed passwords and messaging.
The following settings are available:
entrystore.smtp.host=smtp.host.tld (default: unset)
entrystore.smtp.port=587 (default: 25)
entrystore.smtp.security=starttls|ssl|off (default: off)
entrystore.smtp.username=smtp-user (default: unset)
entrystore.smtp.password=smtp-password (default: unset)
If username and password are unset, no SMTP authentication will be attempted. Both have to be set; if only one of them is set, an error is logged and no SMTP authentication is attempted.
starttls upgrades the connection and fails if the server does not offer STARTTLS, ssl uses implicit TLS (usually port 465). In 6.x a value other than starttls, ssl or off is logged as an error at startup and no mail is sent at all, instead of falling back to an unencrypted connection. A warning is logged if a host is configured but entrystore.smtp.security is not set; set it to off to declare a plaintext relay deliberately.
EntryStore 5.x
In 5.x any value other than starttls or ssl means plaintext. Some older example configurations used the key entrystore.smtp.ssl, which 5.x does not read. 6.x reads it as a deprecated fallback for entrystore.smtp.security, so check such configurations before upgrading, see Upgrading from 5.x to 6.x.
Sender addresses¶
entrystore.smtp.email.from=signup@yourdomain.tld
entrystore.smtp.email.bcc=info+signup@yourdomain.tld
entrystore.smtp.email.reply-to=support@yourdomain.tld
from must be exactly one address. Without it, no mail is sent. bcc and reply-to may each be a comma-separated list; bcc receives a copy of every mail, including messages between users. Invalid addresses are logged as an error at startup.
These keys supersede the deprecated entrystore.auth.email.from and entrystore.auth.email.bcc, which are still read as a fallback (in 6.x a deprecation warning is logged).
Timeouts and retries (6.x)¶
entrystore.smtp.connection-timeout=5s
entrystore.smtp.read-timeout=5s
entrystore.smtp.write-timeout=5s
entrystore.smtp.check-server-identity=true
entrystore.smtp.max-send-attempts=3
The values above are the defaults. read-timeout applies to each read, not to the whole SMTP exchange. check-server-identity=false disables the verification of the server's TLS certificate hostname and should only be used for test servers. max-send-attempts is the total number of attempts (1 to 10), i.e. 3 means two retries. Attempts are made immediately one after another, mostly on the request thread.
The spring.mail.* settings are not used.