Mautic Community Forums

Email configuration problem

Hi,

I’ve installed Mautic version 1.0.1 on a local virtual machine to have a try. I’ve to order of problem to set up system email in configuration panel.



Problem 1 - connect to smtp server:

My first try has been to use a specific company email address on standard smtp server, without encryption, port 25 and plain authentication. In configuration panel there isn’t option to disable encryption, the only possible value are “TLS” and “SSL”. Connection test has give me auth error. So I’ve manually edited app/config/local.php as shown below:

‘mailer_from_name’ => ‘Sales’,

‘mailer_from_email’ => ‘noreply@my_company.it’,

‘mailer_transport’ => ‘smtp’,

‘mailer_host’ => ‘smtp.my_company.it’,

‘mailer_port’ => ‘25’,

‘mailer_user’ => ‘noreply@my_company.it’,

‘mailer_password’ => ‘password’,

‘mailer_encryption’ => null,

‘mailer_auth_mode’ => ‘plain’,



I’ve deleted /app/cache/prod to ensure Mautic use new configuration. I’ve added new lead to campaign list and on log I’ve got this error:



[2015-03-31 17:49:50] mautic.ERROR: [MAIL ERROR] ++ Starting Swift_Transport_EsmtpTransport << 220 smtpcmd03.ad.aruba.it bizsmtp ESMTP server ready >> EHLO 192.168.1.2 << 250-smtpcmd03.ad.aruba.it hello [93.67.113.155], pleased to meet you 250-HELP 250-AUTH LOGIN PLAIN 250-SIZE 524288000 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-STARTTLS 250 OK >> AUTH PLAIN bm1yRXBsYXlBYmlvcmsuaXQAbr1yZCBsYXlAYmlvcxsuaXQAcGZCMm1E << 535 5.7.0 …authentication rejected !! Expected response code 235 but got code “535”, with message "535 5.7.0 …authentication rejected " >> RSET << 250 2.0.0 OK [] []



Why use it TLS in comunication? How can I disable it?



Problem 2: use gmail account

I’ve configured Mautic to use my gmail account (after I’ve disabled security control from it). If I test connection or send a test email, from configuration panel, it works fine. If I add a lead and I assign it to the list connected to a campaign, mail don’t sent to lead email address. I’ve check the log for error and I’ve found that:



[2015-03-31 19:35:54] mautic.ERROR: [MAIL ERROR] ++ Starting Swift_Transport_EsmtpTransport !! Connection could not be established with host smtp.gmail.com [ #0] [] []



Have you Any ideas?



Thanks a lot.

Hi,
I’ve installed Mautic version 1.0.1 on a local virtual machine to have a try. I’ve to order of problem to set up system email in configuration panel.

Problem 1 - connect to smtp server:
My first try has been to use a specific company email address on standard smtp server, without encryption, port 25 and plain authentication. In configuration panel there isn’t option to disable encryption, the only possible value are “TLS” and “SSL”. Connection test has give me auth error. So I’ve manually edited app/config/local.php as shown below:
‘mailer_from_name’ => ‘Sales’,
‘mailer_from_email’ => ‘noreply@my_company.it’,
‘mailer_transport’ => ‘smtp’,
‘mailer_host’ => ‘smtp.my_company.it’,
‘mailer_port’ => ‘25’,
‘mailer_user’ => ‘noreply@my_company.it’,
‘mailer_password’ => ‘password’,
‘mailer_encryption’ => null,
‘mailer_auth_mode’ => ‘plain’,

I’ve deleted /app/cache/prod to ensure Mautic use new configuration. I’ve added new lead to campaign list and on log I’ve got this error:

[2015-03-31 17:49:50] mautic.ERROR: [MAIL ERROR] ++ Starting Swift_Transport_EsmtpTransport << 220 smtpcmd03.ad.aruba.it bizsmtp ESMTP server ready >> EHLO 192.168.1.2 << 250-smtpcmd03.ad.aruba.it hello [93.67.113.155], pleased to meet you 250-HELP 250-AUTH LOGIN PLAIN 250-SIZE 524288000 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-STARTTLS 250 OK >> AUTH PLAIN bm1yRXBsYXlBYmlvcmsuaXQAbr1yZCBsYXlAYmlvcxsuaXQAcGZCMm1E << 535 5.7.0 …authentication rejected !! Expected response code 235 but got code “535”, with message "535 5.7.0 …authentication rejected " >> RSET << 250 2.0.0 OK [] []

Why use it TLS in comunication? How can I disable it?

Problem 2: use gmail account
I’ve configured Mautic to use my gmail account (after I’ve disabled security control from it). If I test connection or send a test email, from configuration panel, it works fine. If I add a lead and I assign it to the list connected to a campaign, mail don’t sent to lead email address. I’ve check the log for error and I’ve found that:

[2015-03-31 19:35:54] mautic.ERROR: [MAIL ERROR] ++ Starting Swift_Transport_EsmtpTransport !! Connection could not be established with host smtp.gmail.com [ #0] [] []

Have you Any ideas?

Thanks a lot.

I’ve reinstalled from scratch. In third form I can set “none” for encryption, so now it works. However, if I access the configuration panel the encryption present only “SSL” and “TLS” value, the “NONE” option is missing.
Can you fix it.

Thanks.

I’ve found the problem.
I’ve changed file app/bundles/CoreBundle/Form/Type/ConfigType.php as below

$builder->add('mailer_encryption', 'choice', array( 'choices' => array( 'ssl' => 'mautic.core.config.mailer_encryption.ssl', 'tls' => 'mautic.core.config.mailer_encryption.tls' ), 'label' => 'mautic.core.config.form.mailer.encryption', 'required' => false, 'attr' => array( 'class' => 'form-control', 'data-show-on' => $smtpServiceShowConditions, 'tooltip' => 'mautic.core.config.form.mailer.encryption.tooltip' ), 'empty_value' => false ));

in

$builder->add('mailer_encryption', 'choice', array( 'choices' => array( 'ssl' => 'mautic.core.config.mailer_encryption.ssl', 'tls' => 'mautic.core.config.mailer_encryption.tls' ), 'label' => 'mautic.core.config.form.mailer.encryption', 'required' => false, 'attr' => array( 'class' => 'form-control', 'data-show-on' => $smtpServiceShowConditions, 'tooltip' => 'mautic.core.config.form.mailer.encryption.tooltip' ), 'empty_value' => 'mautic.install.form.none' ));

(I’ve changed the ‘empty value’) and now I can set None in encryption field in configuration tab.

I think it is necessary to set another option label like ‘mautic.core.config.mailer_encryption.none’ in messages.ini and use it instead of mautic.install.form.none in order to more clarity.

Please you could merge the solution in the source code.

Thanks.