I get this error from anvil-app-server when requesting a user password reset email.
2020-06-02 19:04:21,500 [ERROR anvil.app-server.run] Error report from client code:
AnvilWrappedError: Invalid Addresses
Traceback:
<rpc>:0
anvil-services/anvil/users.py:63
anvil-services/anvil/users.py:469
anvil-services/anvil/users.py:469
app/CC_Test/Form1/__init__.py:15
I had a quick look at some of the source code and It looks to a novice that the smtp email “from address” might be hard coded to “accounts”.
This would make the “Invalid Addresses” error make sense as my email host will not allow a “from address” that is different to the “SMTP User”. However I could be reading the code completely wrong - never looked at clojure code before.
From core.clj Line 232:
(defn send-email! [to subject text]
(if (get-in @util/*session-state* [:users :test-email-divert])
(swap! util/*session-state* update-in [:users :test-email-divert] concat [{:to to, :subject subject, :text text}])
(binding [email/*use-quota* false
email/*require-service-config* false]
(email/send! {:from_name (if (app-data/abuse-caution? util/*session-state* util/*app-id*)
"Accounts"
(str (:name util/*app*) " Accounts"))
:from_address "accounts"
:to to
:subject subject
:text text}))))
Can someone check if I am understanding the code correctly and if my conclusion is correct if there is a work around.
Sorry for the double post I did the noob thing and posted multiple questions in one topic.