Configuring Mailing

Overview of configuration options for the Nette Mail.

If you are not using the whole framework, but only this library, read how to load the configuration.

By default, the mailer Nette\Mail\SendmailMailer is used to send emails, which is not further configured. However, we can switch it to Nette\Mail\SmtpMailer:

mail:
	# use SmtpMailer
	smtp: true       # (bool) defaults to false

	host: ...        # (string)
	port: ...        # (int)
	username: ...    # (string)
	password: ...    # (string)
	timeout: ...     # (int)
	secure: ...      # (ssl|tls|null) defaults to null
	clientHost: ...  # (string) defaults to $_SERVER['HTTP_HOST']
	persistent: ...  # (bool) defaults to false

	# context for connecting to the SMTP server, see stream_context_create()
	context:         # (array) defaults to stream_context_get_default()

To increase trustfulness, we can sign emails using DKIM technology:

mail:
	dkim:
		domain: myweb.com
		selector: lovenette
		privateKey: %appDir%/cert/dkim.priv
		passPhrase: ...