Send Mail

Sends an email message through an email application or via SMTP.

Options 

  • Send via specifies whether your message will be sent by an email client or an SMTP server. (If you choose SMTP Server, the SMTP Options dialog box appears; see Entering or editing SMTP options.)

  • One email using data from the current record sends one message to all specified recipients.

  • Multiple emails (one for each record in found set) sends one message for each record in the found set to all specified recipients.

    If you choose SMTP Server and Multiple emails (one for each record in the found set) and FileMaker Pro encounters an error while emailing one of the records, the remaining records will not be sent.

  • To stores the address(es) of the recipient(s).

  • CC stores the address(es) of the carbon copy recipient(s).

  • BCC stores the address(es) of the blind carbon copy recipient(s).

  • For To, CC, and BCC:

    • Windows: Choose Specify Email Addresses to enter one or more email addresses. Separate each address with a semicolon or carriage return character.

    • Choose Specify Field Name to specify a field that contains one or more email addresses.

    • Choose Specify Calculation to specify a calculation that generates one or more email addresses.

    • Select Collect addresses across found set to use all values from this field or calculation result in the current found set to address a message to multiple recipients. This option is available if you choose One email using data from the current file and use the Specify Field Name or Specify Calculation option to specify a value for the To, CC, or BCC entries.

    Note  If you specify multiple email addresses for To, CC, or BCC, separate each recipient's email address with a carriage return or semicolon. Some email clients do not accept other separators, such as a comma.

  • Subject indicates the title for the email.

  • Message indicates the text of the email. You can type the message as text, use a field value, create a message from a calculation, or insert text from a file.

  • Click Attach Files to specify files to send as attachments with the message. (See Creating file paths.) Instead of searching a list of potential files and choosing the first file it can locate, this step attaches all the files in the list that it can find at the specified paths.

  • With dialog specifies how FileMaker Pro will handle the composed email. If you set With dialog to On, the composed message is left open for review in the email application. (In some applications, the new message is left in the Drafts folder.) If With dialog is Off, the composed email is placed in the email application’s outbox, ready to be sent.

Compatibility 

Product Supported
FileMaker Pro Yes
FileMaker Go Partial
FileMaker WebDirect Partial
FileMaker Server Partial
FileMaker Cloud Partial
FileMaker Data API Partial
Custom Web Publishing Partial

Originated in version 

6.0 or earlier

Description 

Send Mail sends an intranet or internet email through an email application or via SMTP (Simple Mail Transfer Protocol).

Notes 

  • Sending mail using an email application is not supported in server-side scripts, the FileMaker Data API, and Custom Web Publishing.

  • Server-side scripts support sending mail via SMTP. However, if you attach a file, that file needs to be in a folder that server-side scripts are allowed to access. See Paths in server-side scripts.

  • FileMaker WebDirect doesn’t support the Attach Files option. Web users must manually attach saved or exported files to email messages.

  • Custom Web Publishing and the FileMaker Data API don’t support the Attach Files option.

  • FileMaker WebDirect doesn’t support the With dialog: Off option when sending mail via an email client.

  • FileMaker Go doesn’t support the With dialog: Off option. The email displays on the device, and you can send the message manually.

  • If this script step sends an email via an email client in FileMaker WebDirect, limit the To, CC, BCC, Subject, and Body options to 2000 characters total. If the email contains more than 2000 characters, the web browser may not allow FileMaker WebDirect to send the message.

  • To send mail through an email application:

  • You can create a PDF or a Microsoft Excel file from your data to send as an attachment. See Save Records as PDF and Save Records as Excel.

  • The Send Mail script step does not control the font’s appearance. Use the email client to make any changes to the font.

  • FileMaker Pro sends email as plain text. To edit the message's contents and formatting, choose to send the message through an email client and set the With dialog option to On. You can then edit the message within the email client before it is sent.

  • FileMaker Pro verifies the SSL certificate of an SMTP server that is using an encrypted connection. If the certificate cannot be verified, users can choose to connect anyway or cancel to skip this script step. If the certificate cannot be verified and the Set Error Capture script step is set to On, this script step behaves as if the server were unavailable. If the certificate cannot be verified in server-side scripts, the FileMaker Data API, Custom Web Publishing, and FileMaker WebDirect, this script step behaves as if it had been canceled by the user.

Example 1 

Goes to the Customers layout, performs a find, and sends a prewritten email to the address in the Email field in the current record without prompting the user.

Copy
Go to Layout ["Customers"]
Perform Find [Restore]
Send Mail [Send via E-mail Client; With dialog: Off; To: Customers::Email; Subject: Invoices::Summary; Message: "Dear Customer,¶¶Thank you for your business."]
#The Collect addresses across found set option is not selected.

Example 2 

Saves the current record as a PDF, then emails the PDF to the address in the Email field in the current record.

Copy
Go to Layout ["Print Invoices"]
Save Records as PDF [Restore; With dialog: Off; "Invoice.pdf"; Current record ; Create folders: Off]
Send Mail [Send via E-mail Client; With dialog: Off; To: Customers::Email; Subject: Invoices::Summary; Message: "Dear Customer,¶¶Thank you for your business. Your invoice is attached."; "Invoice.pdf"]
Go to Layout [original layout]