C
C#2y ago
reeeeeee

❔ 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
Sossenbinder
Sossenbinder2y ago
So you're looking for a css framework then? There's Tailwind, Bulma, Pico, these just off my head
Anton
Anton2y ago
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
Sossenbinder
Sossenbinder2y ago
Not sure about Tailwind but I think the others can be inlined You should definitely inline your css
reeeeeee
reeeeeeeOP2y ago
@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..
Angius
Angius2y ago
Do yourself a solid and use MJML for creating emails
Angius
Angius2y ago
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.
Angius
Angius2y ago
It takes care of a lot of the tomfuckery with differences between clients, styling shit with tables, all sorts of stuff like that
Sossenbinder
Sossenbinder2y ago
That's pretty nice, I didn't know about this yet
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server