Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

MailComposer.Present

Presents the email composer view.

Component Version macOS Windows Server FileMaker Cloud FileMaker 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


MailComposer.New   -   MailComposer.Result

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins