webcontent-management-systemtimeoutswiftmailerbolt-cms

Bolt CMS - Email host connection timeout when using SimpleForms


I'm currently trying to set up a website using Bolt CMS. For a simple contact form, I'm trying to use the "SimpleForms" extension. For this, it seems I have to set up a "mailoptions" field in "config.yml".

Now, for the mail host I use Zoho Mail. I have successfully made an account, verified my domain and so on. My current mailoptions values in the config look like this:

mailoptions:
    transport: smtp
    host: smtp.zoho.com
    port: 465
    username: ****
    password: ****
    auth_mode: null
    encyption: null
    senderMail: null
    senderName: null 

Notice, I've obviously just inserted some stars where the username and password is supposed to go :-)

Now, I'm not exactly sure what values are allowed for the last 4 fields. I have not for the life of me been able to find any documentation on this. However, if I simply try to send an email through a SimpleForms contact form with these settings, I get the following error:

Swift_TransportException: Connection to smtp.zoho.com:465 Timed Out

Again, haven't been able to find much info on this problem. My initial guess is that it might have to do with me not properly setting the last 4 fields, however I just do not know what they are supposed to be :( All I know, from following a DigitalOcean tutorial (I use DigitalOcean as server host), is that the settings are supposed to be as follow:

I have tried different values for auth_mode and encryption, such as:

However, this still gives me the same timeout error.

[EDIT]

So, I was able to find the actual documentation for the values (which is Swiftmailer related). My current settings looks like this:

mailoptions:
transport: smtp
host: smtp.zoho.com
port: 465
username: ****
password: ****
auth_mode: login
encyption: ssl
senderMail: **** (The same as the username email)
senderName: **** (The name of the email account holder)

I've also double checked the mail settings from Zoho's own website, HERE.

This all seems to be correct settings, however I am still getting the original timeout message :(

EDIT

Check the comment of the answer for my stupid mistake :)


Solution

  • Bolt just uses Swiftmailer via the Silex service provider. The Silex documentation page probably has the answers you're looking for… namely:

    The following options can be set:

    host: SMTP hostname, defaults to 'localhost'.

    port: SMTP port, defaults to 25. username: SMTP username, defaults to an empty string.

    password: SMTP password, defaults to an empty string.

    encryption: SMTP encryption, defaults to null. Valid values are 'tls', 'ssl', or null (indicating no encryption).

    auth_mode: SMTP authentication mode, defaults to null. Valid values are 'plain', 'login', 'cram-md5', or null.