Python Forum
No output for the code to read emails
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No output for the code to read emails
#6
I didn't mention you should change getpass.getuser() to your user name (in the example it reads it from environmental variables)
Quote:getpass.getuser()
Return the “login name” of the user.

This function checks the environment variables LOGNAME, USER, LNAME and USERNAME, in order, and returns the value of the first one which is set to a non-empty string. If none are set, the login name from the password database is returned on systems which support the pwd module, otherwise, an exception is raised.

although I'm not sure this is the cause of the problem.
Also your file name refers to imap and you use POP3. Make sure pop3 is enabled for this account. if you want to use imap, check https://docs.python.org/3/library/imapli...plib.IMAP4
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: No output for the code to read emails - by buran - Aug-13-2018, 09:06 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem in output of a snippet code akbarza 2 430 Feb-28-2024, 07:15 PM
Last Post: deanhystad
  I cannot able to see output of this code ted 1 792 Feb-22-2023, 09:43 PM
Last Post: deanhystad
  Read All Emails from Outlook and add the word counts to a DataFrame sanaman_2000 0 1,911 Sep-15-2022, 07:32 AM
Last Post: sanaman_2000
  why I dont get any output from this code William369 2 1,173 Jun-23-2022, 09:18 PM
Last Post: William369
  Sending Emails on Autopilot Gyga_Hawk 3 1,745 Mar-15-2022, 08:20 AM
Last Post: Larz60+
  How can I organize my code according to output that I want ilknurg 1 1,210 Mar-11-2022, 09:24 AM
Last Post: perfringo
  Mark outlook emails as read using Python! shane88 2 6,677 Feb-24-2022, 11:19 PM
Last Post: Pedroski55
  Python code to read second line from CSV files and create a master CSV file sh1704 1 2,449 Feb-13-2022, 07:13 PM
Last Post: menator01
  Trying out the parsing/reading of emails from my outlook cubangt 0 6,274 Jan-12-2022, 08:59 PM
Last Post: cubangt
  How to read this code? Jlyk 3 1,747 Aug-19-2021, 06:10 AM
Last Post: Jlyk

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020