http.server -> http -> email.sender

Description

Handles website contact POST requests and sends an email after mapping the contact request to an email body.

Simple configuration

Name Type Default value Description
location string The path or set of paths which will be handled by the web application.
logging.ns string http.server.email The logging namespace into which the email sender web application will log to.
info.log string stream: stdout The INFO level logging configuration to apply to the logging namespace used by the email sender web application.
error.log string stream: stderr The ERROR level logging configuration to apply to the logging namespace used by the email sender web application.
host string The email server hostname.
port int The email server port.
user string The name of the email user.
password string The email user's password. Normally supplied via the credentials configuration.
subject string The subject of the email.
from string The from address that the email will be sent from.
to string The email address to send the email to.

Composite configuration

The email.sender composite property does not contain any composite configuration.

Example

			email.sender {
				location   = /ajax/send
				host       = smtp.example.com
				port       = 465
				user       = email-sender
				# The password is normally supplied via separate credentials config.
				password   = qwertyuiop
				subject    = MESSAGE RECEIVED
				from       = enquiry@example.com
				to         = enquiry@example.com
				user-agent = Balau

				success    = /success.html
				failure    = /failure.html

				# These parameters should match the POST request form data.
				parameters {
					Name  = 1
					Email = 2
					Tel   = 3
					Body  = 4
				}
			}