0

I'm trying to extract emails from my domain email address : avamiller@mydomain.com , but i got error socket.gaierror: [Errno 11004] getaddrinfo failed

My domain smtp server working fine, incoming and outgoing emails no issues, and connected my alias on thunderbird mozilla and it working fine too.

Here is my code :

import imaplib, email, os
user = "avamiller@mydomain.com"
password = "abcdefgh"

imap_url = "mail.mydomain.com"


def auth(user,password,imap_url):
    con = imaplib.IMAP4_SSL(imap_url)
    con.login(user,password)
    return con

con = auth(user,password,imap_url)

Error :

socket.gaierror: [Errno 11004] getaddrinfo failed
Sarah Guegan
  • 23
  • 1
  • 6
  • 1
    Looks like a network or DNS problem. Does https://stackoverflow.com/questions/18400208/socket-gaierror-errno-11001-getaddrinfo-failed/32699182 help? Try googling the error message. Check your firewall / network settings. Can a regular email client use IMAP with your server? – Robert Sep 17 '20 at 19:38
  • That means either `mail.mydomain.com` doesn’t actually exist, or your client can’t resolve it for some reason. – Max Sep 17 '20 at 20:32

0 Answers0