Forums

ChronoForms5 over joomla 3.6 - Mailer Error: SMTP connect() failed

Fritz 03 Aug, 2016
I upgraded a website with latest joomla 3.6 and ChronoForms5 (over php 7.0.9).
The PHPMailer works fine because, the integrated test function in joomla (in the global configuration->Server->Mail Setups), sends the test-email without problems.
In the Settings of ChronoForms5 I left blank settings (so ChronoForms use those default of joomla); are flagged only the fields "Safe Save" and "actions display diagnostics".

Yet, after the completion of the form, after the sending and appearing of the thanksgiving window, it appears the yellow error message: "Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting"
If the joomla 3.6 phpmailer (with his test) works fine, why ChronoForms is unable to send?
GreyHead 03 Aug, 2016
Hi Fritz,

Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.

The only think that I can think of is that we found a bug in the way that Joomla! handles Reply To addresses. I'll see if I can find the post - it wasn't very long ago.

Bob
Fritz 04 Aug, 2016
Thank you for your kindness !! Here's the debugger code:

Data Array
Array
(
    [option] => com_chronoforms5
    [chronoform] => Prenotazioni
    [lang] => IT
    [event] => submit
    [nome] => test test test test
    [cognome] => test test test test
    [Indirizzo] => test test test test
    [text9] => test test test test
    [text12] => test test test test
    [text10] => test@test.com
    [dataarrivo] => 12.08.2016
    [datapartenza] => 26.08.2016
    [dropdown11] => camera singola
    [textarea13] => test test test testtest test test testtest test test testtest test test testtest test test test
    [checkbox14] => 1
    [captcha] => 
    [Invio] => invio richiesta
    [ip_address] => 93.89.62.243
)

Array
(
)

Errors

Array
(
)

Debug Info

Array
(
    [0] => Array
        (
            [Email] => Array
                (
                    [0] => An email with the details below could NOT be sent:
                    [1] => To:info@agriturtorboli.it
                    [2] => Subject:Prenotazione
                    [3] => From name:AGRITUR MONTE VELO
                    [4] => From email:info@agriturtorboli.it
                    [5] => CC:
                    [6] => BCC:
                    [7] => Reply name:
                    [8] => Reply email:
                    [9] => Attachments:
                    [10] => Array
                        (
                        )

                    [11] => Body:
<table>
<tbody>
<tr>
<td>nome</td>
<td>test test test test</td>
</tr>
<tr>
<td>cognome</td>
<td>test test test test</td>
</tr>
<tr>
<td>Indirizzo</td>
<td>test test test test</td>
</tr>
<tr>
<td>CAP e Città</td>
<td>test test test test</td>
</tr>
<tr>
<td>telefono</td>
<td>test test test test</td>
</tr>
<tr>
<td>Email</td>
<td>test@test.com</td>
</tr>
<tr>
<td>data arrivo</td>
<td>12.08.2016</td>
</tr>
<tr>
<td>data partenza</td>
<td>26.08.2016</td>
</tr>
<tr>
<td>tipo di camera</td>
<td>camera singola</td>
</tr>
</tbody>
</table><br /><br />IP: 93.89.62.243
                )
        )
)
GreyHead 05 Aug, 2016
Hi Fritz,

There appear to be two problems here:

+ the From and To Emails are the same - that shouldn't cause a problem sending but the email may not be delivered.

+ the From Email doesn't fully match the subdomain. Not sure if that is the cause or not. What is the email address in the Site Mail configuration? If you use that in the From Email box is the email sent?

Bob
Fritz 05 Aug, 2016
I do not think that it depends from the (momentary) subdomain address or from the from/to E-Mail address. The server test send mail function from joomla would not work either; but this setup work fine an joomla send without problems the testing e-mails!
I tried to change the "to" E-Mail address, (the "from" address is the same that is set in the joomla global configuration), but the problem remains.
GreyHead 05 Aug, 2016
Hi Fritz,

By all means PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.

Bob
Fritz 06 Aug, 2016
I wrote to you twice already; ...I hope my messages were not missing!
GreyHead 07 Aug, 2016
Hi Fritz,

I just got to take a look, sorry for the delay.

I do not know what is causing the problem. I have confirmed that the 'Email' link is working from an article, and that ChronoForms is not sending emails :-(

I can only suggest that you check the PHP Mailer FAQ here and check with your web-host.

It is possible that using the same SMTP settings in the ChronoForms Settings tab might work differently, or might give a more helpful error message.

Bob
Fritz 09 Aug, 2016
For to be able to send the forms, I had to change the sending connector by setting the PHP mailer. Now joomla is set with the SMTP mailer while ChronoForms is set with the php mailer. Only in this way the website can send a form.
GreyHead 09 Aug, 2016
Hi Fritz,

Good to hear that you got it to work - there must be something odd about the mail service settings to need this :-(

Bob
lefteriskavadas 03 Feb, 2017
1 Likes
Hi,

This is an issue of the extension.

The PHPMailer class has a variable named SMTPAutoTLS which defaults to true.

Core Joomla! functions are correctly setting this to false before using the PHPMailer class.

Chronoforms is not. As a result, if you have an SMTP server which does not support secure connections the email is failing.
GreyHead 03 Feb, 2017
Hi lefteriskavadas,

Thank you for this - if you need to, you can patch the CF code around line 20 in /libraries/cegcore/libs/mailer.php
		$mail = new \PHPMailer();
$mail->SMTPAutoTLS = false; // << add this line
$mail->CharSet = 'utf-8';
		//get recipients

Bob

See this Perfect article for more info.
bartcelona 09 Jun, 2017
Hi GreyHead,

I tried your suggested change to mailer.php but to no success.

Strange as it appears to be exactly this issue that @lefteriskavadas found (thanks for that)

Btw yes I am on the latest version 5.14 and Joomla J 3.7.2
I have included site info so you can take a look.

Thanks

This is private content



Thanks
GreyHead 09 Jun, 2017
1 Likes
Hi lefteriskavadas,

I checked the login you gave me but it doesn't let me see the Forms Manager (or the mailer file).

Bob
bartcelona 10 Jun, 2017
Hi Thank you for response( I assume it was for me)
I have updated the Joomla Admin access so you can manage the Chronoforms (sorry about that)
In this post I also add FTP access

This is private content

bartcelona 19 Jun, 2017
Thank you bob to continue to work with me via email on this.

To ensure we keep this thread up to date (in the hope it might help others) here are some more details.

At this point I have been told that I can use the SMTP configuration that the Joomla site uses and by-pass Chronoforms for SMTP
That would be perfectly fine with me (even better) as SMTP from Joomla works perfectly fine.

I have however not been able to use this setting (use Joomla settings) as this appears to be in version 5.0.15 and v 5.0.14 is the latest in download section now.

will properly follow up when I have another update
bartcelona 19 Jun, 2017

I don't think that you need the extra emai setting though - if the other settings are empty then CF should use the Joomla! settings by default,




Hi Bob,

I have three options for the Mailer method
- PHP Mailer
- SENDMAIL
- SMTP

(no Joomla and no blank option)

If I set to SMTP and leave all blank it fails.

That was the reason to start this support issue !

again the error I then receive

Mailer Error: SMTP connect() failed.

In hidden info I have provided login details as well as FTP details so you can see yourself

If there is anything else you can suggest I do to get this resolved please let me know !
Max_admin 20 Jun, 2017
1 Likes
Hi bartcelona,

I'm going to test this and let you know.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 20 Jun, 2017
Hi bartcelona,

I have updated your install to v5.0.15 and set the mailer to Joomla, this should fix the mailing issue if your Joomla site can send the emails fine.

But some users have reported a form saving issue with this release, it happens on some servers only, I tested it on yours but everything is working fine, so please test creating a new form and saving it, then test saving an existing form (or better a copy) to make sure that the form settings are retained after saving, if all is good then that should solve the issue and you should update to 5.0.16 when its ready.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.