Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.5.x: email shipping of the form-module is broken #1311

Closed
ChrisEbert opened this issue Jan 13, 2018 · 7 comments
Closed

4.5.x: email shipping of the form-module is broken #1311

ChrisEbert opened this issue Jan 13, 2018 · 7 comments

Comments

@ChrisEbert
Copy link

After updating contao from 4.4.7 to 4.5.2 (PHP version is 7.1), mail delivery of the form-module (and newsletter-bundle) is broken.

I have a simple contact form, to send an email with the contents of the form fields after submitting the form.
After hitting submit, I'm redirected to the redirect-page but no email was sent.

This entry appears inside the System-Log:

Details: | Form "Kontakt" could not be sent: Expected response code 220 but got code "", with message ""
Funktion: | Contao\Form::processFormData

The log-files are empty. There is no special smtp-server configured.

I could not reproduce it for the contao demo, because it is still v4.4.8.

@aschempp
Copy link
Member

Are you using Unix or Windows?

@xchs
Copy link
Contributor

xchs commented Jan 15, 2018

I was also able to reproduce the error (Linux host).

@ChrisEbert
Copy link
Author

The issue appears on unix machines. Locally I'm using the php:7-apache docker image.

@aschempp
Copy link
Member

So the background to my question is that we updated to Swiftmailer 6 in Contao 4.5, which does not longer support the PHP mail() method. It's either SMTP or Postfix sending. The best solution is probably to configure an SMTP server if you don't have one yet.

@ChrisEbert
Copy link
Author

Ah ok. Sounds for me like a breaking change. Wouldn‘t it be bettet to do this in a major contao update?

@Toflar
Copy link
Member

Toflar commented Jan 15, 2018

It's a security related change and it's not a break Contao introduced but Swiftmailer. We cannot stick with old versions forever, it would imply other issues.

@ChrisEbert
Copy link
Author

ChrisEbert commented Jan 15, 2018

Ok, I understand.

After using the STMP server for sending the emails, everything works as expected. 👍

If somebody else is having this issue, there is a nice (german) article on how to configure your own SMTP server in Contao 4 - https://contao.ninja/smtp-einstellungen.html

Thanks for your hard work guys!

leofeyer added a commit that referenced this issue Mar 27, 2020
…see #1586)

Description
-----------

| Q                | A
| -----------------| ---
| Fixed issues     | Fixes #1311
| Docs PR or issue | -

Commits
-------

e3586663 Correctly check for loaded languages when adding the default labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants