0
Receive email
How would i receive an email with no attachments and no subject to python as a string?
30 Answers
+ 1
@Tolo, thank you for helping but it keeps on giving an EOF error on a line that doesent exist
+ 1
When I copied it from my PC I lost the last 3 lines of code. That caused the error but I fixed it
+ 1
thank you
+ 1
for it to work i had to modify the b”{}”.format part to just b”10”
0
Did you try something like that?
https://code.sololearn.com/cNR6O6dPjJTZ/?ref=app
0
it is not printing even though the message in the inbox had nothing besides a couple of words
i removed the try and it gave an error for nullset where data was
0
Try to check if your inbox is named INBOX and if there are any mails
con.list() gives you all you folders you can select
0
ok
0
it doesent work on my end, can you test it with your account and tell me what might be wrong
im using imap.gmail.com for the url
0
For googlemail you need to change some settings so you can use a custom mail program as your python script
0
wait, so it cant run with gmail?
what can i change, i am making a gmail texting program that sends a message to gmail to a sms account like @vtex.com
it sends the message back to the gmail account
0
You can but you have to set some settings before
I am seraching for those
0
You have to turn less secure apps on
0
did that
i had to do it for the smtplib sending part
0
and it doesn't work?
0
no
0
i use my gmail account and password and the url imap.gmail.com
0
what value has your mailpos and how many mails are in your inbox?
0
0 but i cant find anything it relates to
0
con.select(folder)[1] should give you the number of emails in that folder