You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

mail_select_config()

Usage

mail_select_config(name)

Description

Allows selecting a different SMTP configuration (as configured in structr.conf) for outgoing mails. The 6 SMTP settings can be overridden individually by adding a prefixed configuration entry. If no entry is found the default (non-prefixed) value is used.

Example structr.conf

[...]
smtp.host = <server>
smtp.port = <port>
smtp.user = <user>
smtp.password = <password>
smtp.tls.enabled = true
smtp.tls.required = true

myDifferentConfig.smtp.host = <server>
myDifferentConfig.smtp.port = <port>
myDifferentConfig.smtp.user = <user>
myDifferentConfig.smtp.password = <password>
myDifferentConfig.smtp.tls.enabled = true
myDifferentConfig.smtp.tls.required = true
[...]

Example usage

${mail_select_config('myDifferentConfig')}

Search results for "mail_select_config()"

mail_select_config()

Allows selecting a different SMTP configuration (as configured in structr.conf) for the current outgoing mail. The 6 SMTP settings can be overridden individually by adding a prefixed configuration entry. If no entry is found the default (non-prefixed) value is used.

mail_select_config(name)