BE_SMTPSend
BE_SMTPSend(from;to;subject;text;{cc;bcc;replyTo;html;attachments})
Sends an email via SMTP. Use in conjunction with BE_SMTPServer. The To, CC, BCC and attachments can be passed value lists in order to send to multiple people or to include multiple attachments.
Email addresses are in the format :
name@domain
"Full Name <name@domain>"
If you're including an actual name, you MUST include angle brackets around the email address.
replyTomust be an email address only and cannot include a name.
This function can also use the options in the BE_CurlSetOptionfunction, where applicable.
Parameters:
- from : the from name and email address.
- to : who the email is to be sent to. A list for multiple recipients.
- subject : required, but can be an empty string.
- text : required, but can also be empty.
- cc : the cc email list.
- bcc : the bcc email list.
- replyTo : a reply to email address only.
- html : the content of the HTML version of the email.
- attachments : a list of file paths for attachments to be included.
Keywords:
SMTP Send
Version History:
- 3.1 :
- 4.0 : Added an RFC 1123 format date header.
- 4.0.2 : Renamed from BE_SMTPSend
Notes:
- The content of emails on some servers appears to strip FileMaker line endings. Try replacing Char ( 13 ) with Char ( 10 ) in the email content.
- Some servers, in particular various Exchange or Office365 based servers use a different authentication method. When attempting SMTP normally you may get a 35 error. You can force the correct method with :
- BE_CurlSetOption ( "BE_CURLOPT_FORCE_STARTTLS" ; True )
before doing BE_SMTPSend.
Code Examples:
BE_SMTPSend ( "me@me.com" ; "you@you.com" ; "Subject goes here" ; $textContent ; $cc ; $bcc ; "replyto@me.com" ; $htmlContent ; "/path/to/doc.pdf¶/path/to/secondDoc.pdf" )https://docs.baseelementsplugin.com/article/444-besmtpaddattachment for other attachment examples using container fields.