Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

438
Views
What does fail_silently do in send_mail() django?

I have read the documentation of send_mail() but the purpose of fail_silently is not clear yet.

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

According to Django docs:

A boolean. If it’s False, send_mail will raise an smtplib.SMTPException.

So basically, if it's true, you'll get no log or error of a failed sent email.

More info here.

about 4 years ago · Santiago Trujillo Report

0

As qouted by @Nifled, fail_silently() will raise an exception from smtplib. I will explain it by quoting an example: Assume your web app sends an email to a user who submits a feedback every time. If fail_silently() is set to False while DEBUG mode is set to False or True you will get a very ugly error page(although useful in the beginner stages) which you might not want to show to your user and hence fail_silently()=True comes to your rescue. Hope now it's clear!!.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!