//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
//
=== E-mail Configuration

The `core.properties` file holds the configuration options to enable the effective delivery of
<<notifications,notification>> e-mails:

* `spring.mail.host` - the mail server host, typically an SMTP host;
* `spring.mail.port` - the mail server port;
* `spring.mail.username` - (optional) the username for the account at the mail host;
* `spring.mail.password` - (optional) the password for the account at the mail host;
* `spring.mail.properties.mail.smtp.auth` - when `true`, the configured `username` and `password` are sent to SMTP server;
* `spring.mail.properties.mail.smtp.starttls.enable` - when `true`, enable the use of the `STARTTLS` command to switch the connection to a
TLS-protected connection before issuing any login commands;

All the https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html#properties[JavaMail(TM) properties^]
are available for usage with prefix `spring.mail.properties.`.

.Basic configuration, no authentication
====
....
spring.mail.host=your.local.smtp.server
spring.mail.port=25
spring.mail.username=
spring.mail.password=
spring.mail.properties.mail.smtp.auth=false
spring.mail.properties.mail.smtp.starttls.enable=false
....
====

.STARTTLS configuration, with authentication
====
....
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=your_username@gmail.com
spring.mail.password=your_password
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
....
====

[NOTE]
In order to make the changes to `core.properties` effective, the deployment needs to be restarted.

[WARNING]
Be sure to provide a sensible value for the `notificationjob.cronExpression` configuration parameter, otherwise
the <<tasks-notification, notification tasks>> will not be triggered; see <<configuration-parameters, below>> for
details.
