MessageComposer.CanSendText
---------------------------

Checks whether we can send text.

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

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

none

### Result

Returns 1, 0 or error.

### Description

Checks whether we can send text.  
Returns 1 if the user has set up the device for sending text only messages.  
If the return value is 1, the client can set the recipients and body of the message.  
If the return value is 0, the client may notify the user of the failure, or the client may open an SMS URL via open URL command.  
  
This function can be called before having a composer initialized.  
### Examples

Check whether message can be send:

 Set Variable \[ $r ; Value: MBS ( "MessageComposer.CanSendText" ) \]   
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  
### See also

- [MessageComposer.CanSendSubject](MessageComposerCanSendSubject.md)
- [MessageComposer.Present](MessageComposerPresent.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 is free to use.

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

  
[MessageComposer.CanSendSubject](MessageComposerCanSendSubject.md) - [MessageComposer.Dismiss](MessageComposerDismiss.md)

[HTML Version](MessageComposerCanSendText.shtml)