Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Presents the email composer view.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
MailComposer | 7.3 | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |
none
Returns OK or error.
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") ]
This function checks for a license.
Created 10th June 2017, last changed 10th June 2017