-
Notifications
You must be signed in to change notification settings - Fork 31
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
ArgumentError: 1st argument: not an iodata term #303
Comments
Looks like you are using the classic setup. You are most likely missing the root. Please check the first usage option in readme. |
I'm not sure what you mean by missing the root. The defmodule EmailDemoWeb do
# …
def view do
quote do
use Phoenix.View,
root: "lib/email_demo_web/templates",
namespace: EmailDemoWeb If you're suggesting that Swoosh is unable to find the templates at all, that's obviously not the case - just look in the screenshot. You can see that the contents of my text template ( The proximate cause of the problem is that the |
You are right. My apologies. I'm currently travelling overseas and on the phone most of the time, and won't have the opportunity to pull down your code to try it. Might be a good idea to ask on the forum or in slack. |
That being said, I do think you should start generating phoenix projects with 1.7 and take a look at the 1.7 issue in this repo. |
Well yes, but this is for an existing 1.6 app, not a greenfield project, and I can't upgrade to 1.7 just yet. |
Ah okay. 😅 |
I'm getting an error when trying to send an email with both an HTML and text version using
render_body
.I made a minimal app here that replicates the problem. Steps:
phoenix_swoosh
as a dependency.lib/email_demo_web/templates/notifier/email.text.heex
:lib/email_demo_web/templates/notifier/email.html.heex
:Now visit the homepage aaaaand... kaboom:
Is this a bug, or am I doing something wrong?
To make this searchable I'm going to c&p the whole error and stacktrace:
The text was updated successfully, but these errors were encountered: