Comments (6)
Looks like you are using the classic setup. You are most likely missing the root. Please check the first usage option in readme.
from phoenix_swoosh.
I'm not sure what you mean by missing the root. The :root
option is provided by use EmailDemoWeb, :view
in the normal Phoenix way:
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 ("This is a plaintext email"
) has been loaded within the %Phoenix.LiveView.Rendered{}
struct.
The proximate cause of the problem is that the %Phoenix.LiveView.Rendered{}
is being passed to :erlang.io_list_binary()
, which doesn't know how to handle this type of argument. But I don't understand why this is happening.
from phoenix_swoosh.
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.
from phoenix_swoosh.
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.
from phoenix_swoosh.
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.
from phoenix_swoosh.
Ah okay. 😅
from phoenix_swoosh.
Related Issues (17)
- Error when following User_Email example HOT 1
- Release a version based on phoenix 1.3.0-rc HOT 2
- respect the bang syntax HOT 1
- Not yet published? HOT 2
- Implement .render_subject/2 and .render_subject/3 HOT 3
- Mismatch of File doc and Hexdoc HOT 1
- A heads up: we have extract phoenix_view into a separate project HOT 2
- would it be possible to do another release ? HOT 4
- phoenix 1.6-rc0 - render_body with atom do nothing HOT 13
- Upgrading to Swoosh 0.13 HOT 2
- How is the struct %Email{} available? HOT 3
- Phoenix 1.7 and phasing out Phoenix.View HOT 24
- phoenix_html 4.0 compatibility HOT 2
- render_body exception when using email as an assign. HOT 1
- Incorrect Swoosh.Email struct keys set HOT 5
- Why does it need to be in application HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phoenix_swoosh.