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 1045225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:57:07+00:00 2026-05-16T15:57:07+00:00

If I try to send an email as follows, the process hangs and nothing

  • 0

If I try to send an email as follows, the process hangs and nothing happens:

>>> from django.core.management import setup_environ
>>> from cube import settings
>>> setup_environ(settings)
'cube'
>>> from django.core.mail import send_mail
>>> send_mail('Subject', 'Message', 'sender@domain.com', ['recepient@domain.com'], fail_silently=False)

However, doing telnet to port 25 works just fine

$ telnet localhost 25
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
^]

telnet> 

and here’s this just in case

$ netstat -a | grep :smtp
tcp        0      0 *:smtp                  *:*                     LISTEN     
tcp        0      0 localhost:smtp          localhost:44932         ESTABLISHED
tcp        0      0 localhost:44932         localhost:smtp          ESTABLISHED
tcp        0      0 localhost:smtp          localhost:60964         ESTABLISHED
tcp        0      0 localhost:60964         localhost:smtp          ESTABLISHED
tcp        0      0 localhost:37247         localhost:smtp          FIN_WAIT2  
tcp        1      0 localhost:smtp          localhost:37247         CLOSE_WAIT 
tcp        9      0 localhost:smtp          localhost:37245         CLOSE_WAIT 

I run Ubuntu 10.04 and Python 2.6.5

I don’t know where to look next to figure out what’s wrong. Please help me. Thank you.

  • 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-16T15:57:07+00:00Added an answer on May 16, 2026 at 3:57 pm

    Your mail server isn’t working fine. When you connect to it using telnet, you should see a welcome message along the lines of:

    220 your.server.name ESMTP Postfix
    

    (You can check the greeting that you should be seeing by running postconf smtpd_banner.)

    You don’t get that, so the mail server isn’t running properly. send_mail is probably hanging waiting for that initial message.

    Restart Postfix, and look in the /var/log/mail.* log files; there may be a clue in there as to why it’s not working.

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

Sidebar

Related Questions

i have downloaded Swift Mailer from their website and try to send simple email
I try to send email from my application. Everything seems ok, mailmessage, credentials etc.
I am trying to send email using c# following is my code. try {
I'm working with Perl on Windows. I will try to send mail with Email::Sender
i try to send some data to my php file from ajax , but
I try to send json array to ajax (from PHP to jQuery) in my
I am try to send a mail from my php application.Mail send successfully but
I am able to ping smtp.mail.yahoo.com from my system but when i send email
When I try to send an email, I receive the following error: Unable to
I've noticed that if you try to send an email to an invalid address,

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.