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

MailComposer.Present

Presents the email composer view.

Component Version macOS Windows Linux Server iOS SDK
MailComposer 7.3 ❌ No ❌ No ❌ No ❌ No ✅ Yes
MBS( "MailComposer.Present" )

Parameters

none

Result

Returns OK or error.

Description

Presents the email composer view.
This will show the user interface and start the process.
Your script may call this in a script and than wait for the script trigger.

Examples

Setups email and send:

Set Variable [ $r ; Value: MBS( "MailComposer.CanSendMail" ) ]
If [ $r ≠ 1 ]
    Show Custom Dialog [ "Can't send emails." ; "This iOS device is not configured to send emails." ]
    Exit Script [ Text Result: "failed" ]
End If
Set Variable [ $r ; Value: MBS( "MailComposer.New" ) ]
Set Variable [ $r ; Value: MBS( "MailComposer.SetSubject"; PlaceHolder::Subject ) ]
Set Variable [ $r ; Value: MBS( "MailComposer.SetScript"; Get(FileName); "Sent") ]
If [ Length ( PlaceHolder::Body ) > 0 ]
    Set Variable [ $r ; Value: MBS( "MailComposer.SetMessageBody"; PlaceHolder::Body; Position ( PlaceHolder::Body ; "<html>" ; 1 ; 1 ) > 0 ) ]
End If
If [ Length ( PlaceHolder::CCRecipients ) > 0 ]
    Set Variable [ $r ; Value: MBS( "MailComposer.SetCCRecipients"; PlaceHolder::CCRecipients) ]
End If
If [ Length ( PlaceHolder::BCCRecipients ) > 0 ]
    Set Variable [ $r ; Value: MBS( "MailComposer.SetBCCRecipients"; PlaceHolder::BCCRecipients) ]
End If
If [ Length ( PlaceHolder::TORecipients ) > 0 ]
    Set Variable [ $r ; Value: MBS( "MailComposer.SetTORecipients"; PlaceHolder::TORecipients) ]
End If
Perform Script [ “AddAttachment” ; Parameter: GetFieldName ( PlaceHolder::Attachment1 ) ]
Perform Script [ “AddAttachment” ; Parameter: GetFieldName ( PlaceHolder::Attachment2 ) ]
Perform Script [ “AddAttachment” ; Parameter: GetFieldName ( PlaceHolder::Attachment3 ) ]
Set Variable [ $r ; Value: MBS( "MailComposer.Present") ]

See also

Example Databases

This function checks for a license.

Created 10th June 2017, last changed 10th June 2017


MailComposer.New - MailComposer.Result