There is an updated Swift Mailer module now available for FormTools, thanks to Ben McClure, of TopFloorTech.
Here is the background on this update. Like many others who have posted in this Forum, I had trouble with the old Swift Mailer module. I located an update to the FormTools Swift Mailer module on GitHub, provided by Ben McClure. I spoke with Ben by email, and was told that one of the sites he works with uses FormTools. That site needed to send email out through an external SMTP server Amazon SES SMTP, which uses SSL and/or TLS protocols. Since the official Swift Mailer module on the site was an older version that needed updating, he created an update to the FormTools Swift Mailer module, and placed the new working code copy on GitHub.
I downloaded Ben’s updated FormTools Swift Mailer module from GitHub, and now have it working on a site I manage. I wanted to share the upgrade procedure that worked for me, in hopes this may help others who have been having errors in the old Swift Mailer module.
NOTE: Make sure you have loaded and installed the old Swift Mailer module from the FormTools website before you begin these steps. The upgrade provided by Ben is an overlay of upgraded files, and does not contain all of the files necessary for Swift Mailer to work under FormTools. By installing the old Swift Mailer files first, then the upgraded files from GitHub, you will insure that all needed files are present.
1. Download the Files from GitHub (I did this as a ZIP file), from
https://github.com/TopFloorTech/formtool...ler-modern
and unzip them into a directory on your computer. Rename the unzipped folder swift_mailer to match the FormTools Swift Mailer Module’s folder name.
2. Transfer the entire unzipped and renamed folder to the %formtools%/modules folder for your site. This will copy and overwrite the new upgraded files into your existing %formtools%/modules/swift_mailer folder, leaving any old unmodified files still in place on your site.
3. Go into FormTools, Modules, make sure the Swift Mailer module is enabled, and edit and save the email configuration (SMTP server name, authentication information, etc.) (see my notes below on issues I had with the configuration)
Here are some things I discovered that caused issues on the site I updated, and how I resolved them:
1. Ports 465 and 587 blocked by web host: The site was using a shared IP address on the web host. As a result, the two ports 465 and 587 (used for SSL and TLS on most external SMTP servers) were blocked by the web host and could not be unblocked. I resolved this by purchasing a dedicated IP from the web host, and then requesting that they unblock port 587 so that I could use TLS.
2. How to successfully authenticate Gmail SMTP server: I wanted to use the free SMTP provided by Google, smtp.gmail.com for this particular site. I configured the Swift Mailer module’s SMTP settings as follows:
SMTP Server smtp.gmail.com
Port 587
Username email address of the Gmail account I use for this site
Password password of Gmail account
Authentication procedure login
Encryption Type TLS
Advanced Settings
Use Anti Flooding, email batch size 99, batch wait time 2
On the Test email tab, I changed the “from” email to match the email being used to authenticate the SMTP server, then sent a test email. I received an error, but found that this error actually became part of the authentication process. You will probably get an error at this step, as well, unless you have previously allowed “Unsecure Apps” on Gmail for this particular Gmail account. I logged into the Gmail account I am using to authenticate the SMTP for the module, and saw an email from Google saying someone had tried to log into the account from an application, and if that was me, I needed to allow “unsecure apps” to log into Gmail. I clicked the button to do so. My test emails now worked from within the Swift Mailer module, and email from my forms began working as well.
3. Altho’ I specified a “Custom” email address as “From” in the form’s email template, the email address I put in the Swift Mailer module as the SMTP authenticator shows up as the “from” on the sent email instead. However, the “Name” I put in the Custom area of the email template does appear on the email. This is not an issue for me for this particular site, just an oddity.
I hope this upgraded Swift Mailer module works for others, it is really wonderful to have the forms’ email function working properly on my site again.
Here is the background on this update. Like many others who have posted in this Forum, I had trouble with the old Swift Mailer module. I located an update to the FormTools Swift Mailer module on GitHub, provided by Ben McClure. I spoke with Ben by email, and was told that one of the sites he works with uses FormTools. That site needed to send email out through an external SMTP server Amazon SES SMTP, which uses SSL and/or TLS protocols. Since the official Swift Mailer module on the site was an older version that needed updating, he created an update to the FormTools Swift Mailer module, and placed the new working code copy on GitHub.
I downloaded Ben’s updated FormTools Swift Mailer module from GitHub, and now have it working on a site I manage. I wanted to share the upgrade procedure that worked for me, in hopes this may help others who have been having errors in the old Swift Mailer module.
NOTE: Make sure you have loaded and installed the old Swift Mailer module from the FormTools website before you begin these steps. The upgrade provided by Ben is an overlay of upgraded files, and does not contain all of the files necessary for Swift Mailer to work under FormTools. By installing the old Swift Mailer files first, then the upgraded files from GitHub, you will insure that all needed files are present.
1. Download the Files from GitHub (I did this as a ZIP file), from
https://github.com/TopFloorTech/formtool...ler-modern
and unzip them into a directory on your computer. Rename the unzipped folder swift_mailer to match the FormTools Swift Mailer Module’s folder name.
2. Transfer the entire unzipped and renamed folder to the %formtools%/modules folder for your site. This will copy and overwrite the new upgraded files into your existing %formtools%/modules/swift_mailer folder, leaving any old unmodified files still in place on your site.
3. Go into FormTools, Modules, make sure the Swift Mailer module is enabled, and edit and save the email configuration (SMTP server name, authentication information, etc.) (see my notes below on issues I had with the configuration)
Here are some things I discovered that caused issues on the site I updated, and how I resolved them:
1. Ports 465 and 587 blocked by web host: The site was using a shared IP address on the web host. As a result, the two ports 465 and 587 (used for SSL and TLS on most external SMTP servers) were blocked by the web host and could not be unblocked. I resolved this by purchasing a dedicated IP from the web host, and then requesting that they unblock port 587 so that I could use TLS.
2. How to successfully authenticate Gmail SMTP server: I wanted to use the free SMTP provided by Google, smtp.gmail.com for this particular site. I configured the Swift Mailer module’s SMTP settings as follows:
SMTP Server smtp.gmail.com
Port 587
Username email address of the Gmail account I use for this site
Password password of Gmail account
Authentication procedure login
Encryption Type TLS
Advanced Settings
Use Anti Flooding, email batch size 99, batch wait time 2
On the Test email tab, I changed the “from” email to match the email being used to authenticate the SMTP server, then sent a test email. I received an error, but found that this error actually became part of the authentication process. You will probably get an error at this step, as well, unless you have previously allowed “Unsecure Apps” on Gmail for this particular Gmail account. I logged into the Gmail account I am using to authenticate the SMTP for the module, and saw an email from Google saying someone had tried to log into the account from an application, and if that was me, I needed to allow “unsecure apps” to log into Gmail. I clicked the button to do so. My test emails now worked from within the Swift Mailer module, and email from my forms began working as well.
3. Altho’ I specified a “Custom” email address as “From” in the form’s email template, the email address I put in the Swift Mailer module as the SMTP authenticator shows up as the “from” on the sent email instead. However, the “Name” I put in the Custom area of the email template does appear on the email. This is not an issue for me for this particular site, just an oddity.
I hope this upgraded Swift Mailer module works for others, it is really wonderful to have the forms’ email function working properly on my site again.