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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
MailComposer.Present
Presents the email composer view.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| MailComposer | 7.3 | No | No | No | No | Yes |
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
- MailComposer.IsPresented
- MailComposer.New
- MailComposer.Result
- MailComposer.SetBCCRecipients
- MailComposer.SetCCRecipients
- MailComposer.SetMessageBody
- MailComposer.SetScript
- MailComposer.SetTORecipients
- MessageComposer.Present
- SocialComposer.Present
Example Databases
Created 10th June 2017, last changed 10th June 2017
MailComposer.New - MailComposer.Result
Feedback: Report problem or ask question.
Links
MBS FileMaker Plugins