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.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Adds an attachment to the email based on a container field.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
MessageComposer | 7.3 | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
Container | The container to attach to email. | Attachment::Container | |
Name | The name for the attachment. | "sample.pdf" | |
MimeType | The UTI, file extension or mime type to use. e.g. "application/pdf" for PDF files. If missing, we use "application/octet-stream". | "application/octet-stream" | Optional |
Returns OK or error.
Adds an attachment:
Set Variable [ $FieldName ; Value: Get(ScriptParameter) ]
Set Variable [ $Container ; Value: GetField ( $FieldName) ]
If [ IsEmpty ( $container ) = 0 ]
Set Variable [ $path ; Value: GetAsText ( $Container ) ]
Set Variable [ $name ; Value: MBS( "Path.LastPathComponent"; $path) ]
Set Variable [ $extension ; Value: MBS( "Files.FileExtension"; $name ) ]
Set Variable [ $mimeType ; Value: MBS( "Text.FileExtensionToMimeType"; $extension ) ]
#
Set Variable [ $r ; Value: MBS( "MessageComposer.AddAttachmentContainer"; $container; $name; $mimeType) ]
End If
Created 10th June 2017, last changed 10th June 2017
Menubar.SetMenuCommandVisible - MessageComposer.AddAttachmentFile
Feedback: Report problem or ask question.