Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6555029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:46:12+00:00 2026-05-25T12:46:12+00:00

I’m trying to understand how this works. When I normally send and email and

  • 0

I’m trying to understand how this works.

When I normally send and email and the recipient doesn’t exist, or some other error occurs, an email is send back containing the info about the error and the status. This can take some time.

My question here is how can smtplib catch this error if this response take time?
When I send an email using smtplib it never raises the SMTPRecipientsRefused exception. It just sends the email and later, when purposely using an invalid email address, I get the “Delivery to the following recipient failed permanently:” error in my reply-to email box. This doesn’t help me as I am trying to clean my email address database from invalid email addresses.

There is the verify function:

SMTP.verify(address)

But I don’t believe this is a real option. Note from python docs on VRFY:
“Many sites disable SMTP VRFY in order to foil spammers.”

A note on my testing environment: I’m using django and a remote SMTP server (gmail/apps).
Q1: Is this the reason for not being able to catch the error? Should I be using a local server?

Q2: Is there a way to do this except from parsing my actual error emails from the reply-to email box?

Thanks in advance for any thoughts on the matter!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:46:13+00:00Added an answer on May 25, 2026 at 12:46 pm
    1. Yes this is why you don’t get the Exception. Using a local server will not help because your local server has no idea if a given email address is valid. Only the destination domain’s MX mail server has any clue, and it often isn’t motivated to tell you until much later.
    2. Not really. As the other answer suggests, try Python’s imaplib or poplib to help you retrieve bounce messages.

    No idea what your application is, but another option if you have an associated website is to periodically ask your users upon login to verify/update their email address.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.