Content
You are here:
Sendmail does not work "An SMTP From address is required..."
Added by John Doe over 10 years ago
I’m using 3.0.8 (stable) and want to use OpenProject with sendmail.
This is my config:
default: email_delivery_method: :sendmail sendmail_location: "/usr/bin/sendmail" attachments_storage_path: /path/to/my/storage/location rails_cache_store: :memcache session_store: :cookie_store database_cipher_key: 123451234512345123451234512345 development: email_delivery_method: :letter_opener test: email_delivery_method: :test production: session_store: :cache_store email_delivery_method: :sendmail sendmail_location: "/usr/bin/sendmail"
My nginx is running as user http. So if I try to use sendmail as user http it just works (sendmail v receiver@domain.tld [enter], type text, ctrl+d finished). But if I want to sent an email to a new user with his account information I get the following production log:
Sent mail to root@mylocaldomain.TLD (5.1ms) Completed 500 Internal Server Error in 159.9ms ArgumentError (An SMTP From address is required to send a message. Set the message smtp_envelope_from, return_path, sender, or from address.): app/controllers/users_controller.rb:188:in `update'
It’s driving me nuts. Even tried to send via smtp to localhost - no luck. I’m evaluating this to use it for my faculty at university, so any help appreciated to get this working.
Thanks in advance
John
Replies (1)
Well, no problem here anymore. To solve it sometimes you need to write down what your problem is.
So excuse me for my stupidness.
As the log says: I need to set a from address.
Well, I looked in the config file and tried every combination I could think of. So I looked in the code and set the from myself - that whas the easy part :stuck_out_tongue_winking_eye:.
So that seems to work. Strange, maybe somebody forgot something in the configuration to parse?
Yes, right. A project that has already existed for many years forgets something to parse, right john, go jump in a lake!
Magically as I remembered yesterday, there has been a option somewhere in the configuration where it said “from address”…
Maybe… no! That’s a lot to thin.
So 12 hours later, setting the option in the webfrontend, sendmail begins to work :smile_cat::gun:
Sorry again and thanks to all the contributors who make OpenProject possible.