Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

Contact form broken when no contact e-mail specified [v5.5] #1524

Closed
@orenyk

Description

@orenyk

It's working in development because of letter_opener (which apparently doesn't care about having a to address). On Heroku this broke:

2016-03-08T21:39:09.433916+00:00 app[web.1]: 
2016-03-08T21:39:09.433934+00:00 app[web.1]: Sent mail to  (9.1ms)
2016-03-08T21:39:09.433939+00:00 app[web.1]: Date: Tue, 08 Mar 2016 21:39:09 +0000
2016-03-08T21:39:09.433940+00:00 app[web.1]: From: [email protected]
2016-03-08T21:39:09.433942+00:00 app[web.1]: Subject: [Reservations Demo] my subject
2016-03-08T21:39:09.433941+00:00 app[web.1]: Message-ID: <56df467d69253_a3fef82c2199051261@8328af69-6f3a-457e-a2b7-9441f67b2c65.mail>
2016-03-08T21:39:09.433942+00:00 app[web.1]: Mime-Version: 1.0
2016-03-08T21:39:09.433943+00:00 app[web.1]: Content-Type: text/plain;
2016-03-08T21:39:09.433943+00:00 app[web.1]:  charset=UTF-8
2016-03-08T21:39:09.433944+00:00 app[web.1]: 
2016-03-08T21:39:09.433944+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2016-03-08T21:39:09.433946+00:00 app[web.1]: ---------------------
2016-03-08T21:39:09.433945+00:00 app[web.1]: this is a test e-mail
2016-03-08T21:39:09.437130+00:00 app[web.1]: ArgumentError (An SMTP To address is required to send a message. Set the message smtp_envelope_to, to, cc, or bcc address.):
2016-03-08T21:39:09.433946+00:00 app[web.1]: 
2016-03-08T21:39:09.437132+00:00 app[web.1]:   app/controllers/contact_controller.rb:11:in `create'
2016-03-08T21:39:09.433947+00:00 app[web.1]: 
2016-03-08T21:39:09.437133+00:00 app[web.1]: 
2016-03-08T21:39:09.437133+00:00 app[web.1]: 
2016-03-08T21:39:09.437117+00:00 app[web.1]: 
2016-03-08T21:39:09.437403+00:00 app[web.1]: source=rack-timeout id=0fa9422d-1e00-4c63-978c-27921a421a20 wait=6ms timeout=10000ms service=356ms state=completed
2016-03-08T21:39:09.433948+00:00 app[web.1]: Sent by my name from [email protected]
2016-03-08T21:39:09.435750+00:00 app[web.1]: Completed 500 Internal Server Error in 336ms (ActiveRecord: 6.3ms)

It should fall back to the admin e-mail. We might also want to back-port it to v5.5...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions