![]() The From and To lines contain the sender and recipient(s), formatted as Sender Name (to include the sender’s display name) or just (no display name). But let’s start with a very basic structure of a MIME formatted message: From: Sender Name MIME is a pretty deep topic that could fill an article all on its own. MIME, or Multipurpose Internet Mail Extensions, is a standard for formatting email messages to support text, attachments, and messages with multiple parts. Be sure to specify the variable name the same way as handled with the -upload-file option. This can be helpful for debugging purposes. The -dump-headers option returns the full cURL response headers to the variable name specified.If the request fails, use the Get(LastExternalErrorDetail) function to get the cURL response code. Include the -show-error option to be able to see specific errors returned by the cURL library.An alternative cURL option is -ssl which means that SSL/TLS is attempted, but if it’s not available, the request reverts to a non-secure connection. -ssl-reqd tells the URL request to require an SSL/TLS (encrypted) connection with the SMTP server if this is not available, the connection is terminated.There are a few additional options which are not strictly required but are recommended: "-ssl-reqd The account and password are not enclosed in quotes.In other words, the cURL option should be written as "-upload-file $mail_file" and not "-upload-file " & $mail_file. This is explained in more detail below, but note that only the variable name is indicated in the cURL options string, not the variable content itself. The -upload-file option specifies a variable which has been set to a container data object containing the message in raw MIME format.This includes To, Cc, and Bcc recipients. For multiple recipients, repeat the -mail-rcpt option for each individual recipient.The sender and recipient addresses are not enclosed in quotes.The full cURL options string for these would look something like: "-mail-from $mail_file ![]() There are four required cURL options to send mail with SMTP. explicit STARTTLS details on this are beyond the scope of this article). ![]() Generally speaking, the protocol and port define the type of security initiated (implicit TLS vs. If the port is 465, use the “smtps” URL protocol if it’s 587 or another port, use “smtp”. Your email provider will likely have its SMTP server and port information documented online. The URL is the SMTP server address, preceded with the “smtps” or “smtp” URL protocol, and followed by the port number. There are a few additional options in the Insert from URL script step which we’ll also review. To send mail using the Insert from URL script step, there are three major components you need to assemble: the URL, the cURL options string, and the message content in raw MIME format. Note that sending email with SMTP and cURL works across the entire FileMaker 18 platform, including FileMaker Pro Advanced, FileMaker Go, WebDirect, and server-side scripts. Finally, we’ll look at how this new feature compares to some alternatives for sending mail from your FileMaker app. We’ve also built a robust demo file you can download for free and use to dig into this functionality in more detail, and we’ll discuss some of its capabilities here. In this article we’ll review how sending mail using SMTP and cURL in FileMaker 18 works and go through several examples. Using cURL to send emails with attachments provides additional capabilities that makes FileMaker HTML emails more robust. Sending HTML email has been a long-requested feature for the FileMaker platform and was previously only available through plug-ins or, more recently, external API calls. This means that sending email is now possible using Insert from URL, including the ability to send HTML email! Insert from URL now supports the smtp and smtps URL protocols, as well as a few related cURL options. A major new feature in FileMaker 18 that has flown somewhat under the radar is the expanded capability of the Insert from URL script step.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |