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.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
SendMail.SetSMTPServer
Sets which SMTP server to use.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| SendMail | 4.3 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| EmailID | The email reference number obtained using SendMail.CreateEmail function. | $EmailID | |
| Server | The new SMTP Server address. | "smtp.mac.com" | |
| SSL | Optional, pass 1 to use SSL, else 0. Pass 0 for TLS and later configure CURL for TLS. Pass 1 if you use port 465 to enable SSL. |
1 | Optional |
Result
Returns OK or error.
Description
Sets which SMTP server to use.There are a few combinations possible.
First you can use SendMail.SetSMTPServer with SSL and pass 1 there.
Or you pass 0 for no SSL. Still you can use CURL.SetOptionFTPSSL set to 3 to allow TLS for an upgrade of the unencrypted connection to SSL later.
Some servers don't support unencrypted, SSL or TLS, so only one may work.
And ports can be difficult, too. You can use CURL.SetOptionPort to set a port explicit or include it in the server with double colon on the end. Common ports are 25, 587 or 465.
Alternative to this method you can set CURL.SetOptionURL directly.
Examples
Start new email and setup SMTP login:
Set Variable [$EmailID; Value:MBS("SendMail.CreateEmail")]
Set Variable [$r; Value:MBS("SendMail.SetSMTPServer"; $EmailID; EMail::SMTP Server; EMail::SMTP SSL)]
Set Variable [$r; Value:MBS("SendMail.SetSMTPUserName"; $EmailID; EMail::SMTP Username)]
Set Variable [$r; Value:MBS("SendMail.SetSMTPPassword"; $EmailID; EMail::SMTP Password)]
See also
- CURL.SetOptionPort
- CURL.SetOptionURL
- SendMail.CreateEmail
- SendMail.GetSMTPServer
- SendMail.PrepareCURL
- SendMail.SetSMTPPassword
- SendMail.SetSMTPUserName
Example Databases
Blog Entries
- Email Script for FileMaker
- Comparing Base Elements Plugin to MBS FileMaker Plugin
- Sending emails in FileMaker with MBS Plugin
- Sending Email with FileMaker via MBS Plugin
FileMaker Magazin
Created 3th September 2014, last changed 28th February 2020
SendMail.SetSMTPPassword - SendMail.SetSMTPUserName
Feedback: Report problem or ask question.
Links
MBS FileMaker Plugins