help | 2 The Graphical Script Editor | Variables and System Functions | The Use of Variables in E-Mail Texts
The Use of Variables in E-Mail Texts
If you would like to use a variable in the text of a sent e-mail, you must define the entire text of the e-mail as an expression.
Example:
The following should appear later in the text of the e-mail:
You received at <CurTime> a call from the number <IpPbx.CallingNumber>.
An attempt to connect the call to <Substitute> was made.
Sincerely, your SwyxServer.
In this case, “Substitute” is a user-defined variable, which is defined during the execution of the script (e.g. depending on a number entered via DTMF by the caller or according to the time of the call, a different substitute is defined).
In this case, the following contents must be in the “Text” field in the block “Send E-mail”:
= "You received a message at “ & CurTime() & “ from the number "_
& IpPbx.CallingNumber & "." & vbLF _
& "An attempt to connect the call to " & Substitute & " was made." & vbLF _
& "Sincerely, your SwyxServer."
* 
Make sure to use a blank between "vbLF" and the underscore.
 
Use the underscore (_) as the last symbol of the line in the editing of the expression for all lines except the last one and vbLF (Visual Basic Line Feed) as the symbol for the line break in the e-mail text.
Last modified date: 06.16.2023