Buy this Domain

Community Discussions

Explore the latest discussions and community conversations related to this domain.

How to put bootstrap 4 design to email template

Main Post:

So I have an email function which would send an email to the user, and of course I wouldn't want it to be just a plain text/html. I want it to have some design into it, am using bootstrap 4 for my design on the website so I'm planning to use bootstrap 4 for designing the email message too. But it somehow doesn't work, the design just won't come out. Here's my code

from django.template.loader import render_to_string from django.core.mail import send_mail from django.http import HttpResponse def sendemail(request): msg_plain = render_to_string('email.txt', {'some_params': 'testing'}) msg_html = render_to_string('email.html', {'some_params': 'testing'}) send_mail( 'email title', msg_plain, '[email protected]', ['[email protected]'], html_message=msg_html, ) return HttpResponse('success')

Here's my email.html template

<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Email</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> </head> <body> <div class="container bg-dark"> <h1>TEST</h1> </div> </body> </html>

It doesn't work, just a plain string is on the email. Any tips?

Top Comment:

Forget everything you know about Bootstrap and HTML and CSS. Email markup is a beast unto itself that happens to look syntactically similar to HTML, in the way that JS looks like Java. Technically this isn’t true, but it’s the only mental model that will keep you sane.

Fonts won’t load. Everything has to be an inline style to have full compatibility. Everything has to be a table to have full compatibility which flies against every instinct of modern web development. Bootstrap won’t help you there.

We’ve used https://tedgoas.github.io/Cerberus/ but even then it’s a pain. Highly considering https://mjml.io/ if we can figure out a sane way to incorporate the rendering into our app servers - we may need to have node installed on every app server, render Django templates into mjml then compile to email, rely heavily on prerendering of HTML into images that we then embed in mjml. The whole space is insane. If you feel you’ve found an elegant solution, let us know.

Forum: r/django

Email notifications 6.4.2

Main Post:

Any idea how to set up email notifications on 6.4.2? The option is just completely missing from the logs menu.

I've got a new client where we just deployed a 60F and I'd like to slowly enable firewall policies. Normally in the past when I've done this, I've enable email notifications for blocked traffic to help me see if I've missed something that needs to be allowed through.

I love Fortigate functionality, but I can't for the life of me understand why these firmware updates keep moving basic things around or making them completely invisible.

I'm starting to think that 6.4.2 is just a buggy mess after the workaround I had to do for Fortiguard DDNS... really wishing I wouldn't have upgraded this thing at the moment.

Help pls

Top Comment:

Hi u/medium0rare,

Email notifications are now configured generically as part of the Security Fabric -> Automation feature set. You can configure triggers for specific events, and then define the "action" to be email alert. Since it's part of the Automation framework, your action can include any number of other things, like receiving a push notification on your phone via FortiExplorer.

If you have additional use cases you'd like to see within Automation, you can share your feedback in a thread I started here: https://www.reddit.com/r/fortinet/comments/hfr9az/security_fabric_automation_use_cases/

Forum: r/fortinet

[EUNE] Email Verification is Live - Get your free 4 Win IP Boost!

Main Post:

Login here, verify your email and get 4 win IP boost. :)

Top Comment:

  1. Be on Euw
  2. Verify your email
  3. Tranfer to EUNE for free
  4. Verify your accaunt for 2nd time
  5. Profit

Forum: r/leagueoflegends

4-digit email authentication code using only Firebase Auth?

Main Post:

Hey everyone,

I'm new to Firebase and currently trying to implement a 4-digit authentication code via email using only Firebase Authentication (without Firestore or Cloud Functions since its expensive).

My goal is to use this for Forgot Password verification

From what I know, Firebase Auth only supports sending a password reset link or the default email verification process. But I want to send a 4-digit code instead.

  • Is this possible using only Firebase Auth?
  • If not, are there any open-source alternatives I can use for this feature?

Would appreciate any recommendations! Thanks.

Top Comment: Have you considered Authenticate Using Email Link ?

Forum: r/Firebase

diablo 4 invite question

Main Post:

I may have gotten the email and linked my account i was wondering if everyone who got the email gets the how to play email shortly after?

Top Comment:

I don’t know why you’re getting downvoted. To answer your question, no one knows. I’m sure as soon as they do this sub will be filled with some people who got the email and the other half will be salty still. Just be patient.

Forum: r/diablo4

Emails with open beta codes is being sent out now

Main Post:

Just got my email with the code they promised 🙂

Top Comment:

Title is wrong. Open beta is actually completely "open" and requires no code at all. The one this Friday is "closed" and requires a code (which is easy enough to get though).

Forum: r/diablo4