Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Creates a new email.

Component Version macOS Windows Linux Server iOS SDK
WinSendMail 7.1 ❌ No ✅ Yes ❌ No ❌ No ❌ No
MBS( "WinSendMail.CreateEmail" )




Returns email number or error.


Creates a new email.
The reference number returned by this function can be passed to other plugin functions for setting up the email.
Later use WinSendMail.Release to free memory.
SendMail reference numbers are starting at 67000 and counting up for each new email.


Send an email with values from field:

Set Variable [ $email; Value:MBS( "WinSendMail.CreateEmail" ) ]
Set Variable [ $r; Value:MBS( "WinSendMail.AddTo"; $email; Send::To Email ; Send::To Name ) ]
Set Variable [ $r; Value:MBS( "WinSendMail.AddCC"; $email; Send::CC Email ; Send::CC Name ) ]
Set Variable [ $r; Value:MBS( "WinSendMail.SetFrom"; $email; Send::From Email ; Send::From Name ) ]
Set Variable [ $r; Value:MBS( "WinSendMail.SetSubject"; $email; Send::Subject ) ]
Set Variable [ $r; Value:MBS( "WinSendMail.SetText"; $email; Send::Text) ]
Set Variable [ $r; Value:MBS( "WinSendMail.Send"; $email ) ]
If [ MBS("IsError") ]
    Show Custom Dialog [ Title: "Failed to send email"; Message: $r; Default Button: “OK”, Commit: “Yes”; Commit: “No” ]
    Pause/Resume Script [ Duration (seconds): 2 ]
End If
Set Variable [ $r; Value:MBS( "WinSendMail.Release"; $email ) ]

See also

Example Databases

This function checks for a license.

Created 28th February 2017, last changed 25th November 2019

WinSendMail.ClearRecipients - WinSendMail.GetSubject