MessageComposer.Present
-----------------------

Presents the message composer view.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [MessageComposer](component_MessageComposer.md) | [7.3](newinversion73.md) | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "MessageComposer.Present" ) ### Parameters

none

### Result

Returns OK or error.

### Description

Presents the message 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

Send a message with options:

 Set Variable \[ $r ; Value: MBS ( "[MessageComposer.CanSendText](MessageComposerCanSendText.md)" ) \]   
If \[ $r ≠ 1 \]   
 Show Custom Dialog \[ "Can't send emails." ; "This iOS device is not configured to send text messages." \]   
 Exit Script \[ Text Result: "failed" \]   
End If  
Set Variable \[ $r ; Value: MBS ( "[MessageComposer.New](MessageComposerNew.md)" ) \]   
If \[ Length ( PlaceHolder::Subject ) &gt; 0 \]   
 Set Variable \[ $r ; Value: MBS ( "[MessageComposer.SetSubject](MessageComposerSetSubject.md)"; PlaceHolder::Subject ) \]   
End If  
Set Variable \[ $r ; Value: MBS ( "[MessageComposer.SetScript](MessageComposerSetScript.md)"; Get(FileName); "Sent") \]   
If \[ Length ( PlaceHolder::Body ) &gt; 0 \]   
 Set Variable \[ $r ; Value: MBS ( "[MessageComposer.SetMessageBody](MessageComposerSetMessageBody.md)"; PlaceHolder::Body ) \]   
End If  
If \[ Length ( PlaceHolder::Recipients ) &gt; 0 \]   
 Set Variable \[ $r ; Value: MBS ( "[MessageComposer.SetRecipients](MessageComposerSetRecipients.md)"; PlaceHolder::Recipients ) \]   
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 ( "MessageComposer.Present") \]  
### See also

- [MailComposer.Present](MailComposerPresent.md)
- [MessageComposer.CanSendText](MessageComposerCanSendText.md)
- [MessageComposer.IsPresented](MessageComposerIsPresented.md)
- [MessageComposer.New](MessageComposerNew.md)
- [MessageComposer.Result](MessageComposerResult.md)
- [MessageComposer.SetMessageBody](MessageComposerSetMessageBody.md)
- [MessageComposer.SetRecipients](MessageComposerSetRecipients.md)
- [MessageComposer.SetScript](MessageComposerSetScript.md)
- [MessageComposer.SetSubject](MessageComposerSetSubject.md)
- [SocialComposer.Present](SocialComposerPresent.md)

### Example Databases

- [iOS/Examples/iOS Message Sending](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/iOS/Examples/iOS%20Message%20Sending.shtml#4ScriptAnchor_)

This function checks for a license.

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

  
[MessageComposer.New](MessageComposerNew.md) - [MessageComposer.Result](MessageComposerResult.md)

[HTML Version](MessageComposerPresent.shtml)