❔ Render email content .NET 7 (razor)
I have to reinplement email content rendering, because currently its not looking really good, especially not on mobile.
Right now, we are rendering cshtml view and sending its content, but as mentioned before, styling and responsiveness is not so good, especially on mobile...
Do you have any idea how could I improve that, maybe use any other library/framework or something like that?
9 Replies
So you're looking for a css framework then?
There's Tailwind, Bulma, Pico, these just off my head
how do you embed tailwind into an email rendered with razor? is that actually a thing?
I guess you could make tools that do this, but I doubt there's anything premade for it
Not sure about Tailwind but I think the others can be inlined
You should definitely inline your css
@Sossenbinder @AntonC sorry for late response
actually I meant something like "what is the best way to design email content"
Because for example different mail client shows email differently
for example, I somehow managed to make it OK for Outlook web and mobile, but Outlook desktop is really limit and looks pretty bad..
Do yourself a solid and use MJML for creating emails
MJML - The Responsive Email Framework
The only framework that makes responsive email easy. MJML is a markup language designed to reduce the pain of coding a responsive email.
It takes care of a lot of the tomfuckery with differences between clients, styling shit with tables, all sorts of stuff like that
That's pretty nice, I didn't know about this yet
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.