Skip to main content
Version: 4.25.x.x LTS

SendMail

Introduction and overview

The SendMail AuthState is a generic AuthState to send e-mails.

Description

The following table describes the characteristics of the AuthState.

TopicDescription
Classch.nevis.esauth.auth.states.mail.SendMail
LoggingStdStates
Auditingnone
PropertiessmtpHost (string, -)The host of the SMTP server.
smtpPort (int, 25)The port number of the SMTP server.
smtpUser (string, -)The user used for authentication on the SMTP server.
PropertiessmtpPass (string, -)The passphrase used for authentication on the SMTP server.
subject (string, -)The subject of the e-mail. Expressions will be substituted during the request.
body (string, -)The body of the e-mail. Expressions will be substituted during the request.
sender (string, -)The sender of the e-mail. Expressions will be substituted during the request..
receivers (string, -)Comma-, semicolon- or space-separated list of receivers. Expressions will be substituted during the request.
contentType (string, "text/plain")The content type of the e-mail body.
Methodsprocess (all events)
Inputnone (except over variable substitution)
Transitionsok: if sending was successful
sendFailed (optional): If an error happened during sending.
default: If an error happened.
ErrorsAUTH_FAILED if sending of the email failed and no sendFailed transition is configured.

Example

<AuthState name="SendMail"
class="ch.nevis.esauth.auth.states.standard.SendMail" final="false">
<ResultCond name="default" next="AuthError" />
<ResultCond name="ok" next="DoMoreStuff" />
<Response value="AUTH_ERROR">
<Gui name="AuthErrorDialog"/>
</Response>

<property name="smtpHost" value="smtp.gmail.com" />
<property name="smtpPort" value="543" />
<property name="smtpUser" value="[email protected]" />
<property name="smtpPass" value="secret" />
<property name="subject" value="Welcome ${request:userId}" />
<property name="body" value="${notes:template}" />
<property name="sender" value="[email protected]" />
<property name="receivers" value="${notes:email}" />
</AuthState>