30 Days of Python - Day 9 - Send Email & Read Inbox - Python TUTORIAL

Поделиться
HTML-код
  • Опубликовано: 2 ноя 2024

Комментарии • 123

  • @guyincognito1985
    @guyincognito1985 3 года назад +22

    I'm loving these videos. For reference, I've been coding for 20+ years in the angle brackety languages (C, C++, Java, Javascript and C#), but I'm really interested in Python (although I have no idea where I'm supposed to put the semi-colons! 😁). What I really like about your videos is that you use a large enough font where I don't have to strain my eyes to see what you're doing. I also like the green-screened/cropped head in the lower corner so it doesn't obscure anything. I think these videos of you showing how to "do something practical" are really helpful, even for beginning programmers. Just learning the syntax and keywords can become really boring, really quick.

    • @warrior2364
      @warrior2364 2 года назад

      The fact that Python doesn't use brackets makes it seem childish for other programmers, but if you look at what you can code with Python, it really isn't!

  • @PreguntaleaRokowooow
    @PreguntaleaRokowooow Год назад +2

    Can't thank you enough for such good quality tutorials, however this one is not possible to do now since google permanently disabled less secure app access option...

    • @hungerforpython
      @hungerforpython Год назад +1

      Hey, did you find any work around? I used send grid but the MFA was not getting set, I used rediff as well but it did not work.

  • @ancientcitymusic8301
    @ancientcitymusic8301 3 года назад +2

    Thank you, thank you, thank you! for being on point and not wasting my time with frivolous information as some other channels do! Your my hero! Great on point video.

  • @gabenewell8583
    @gabenewell8583 4 года назад +10

    Damn, this is some next-level stuff. I love it, keep it up.

  • @EA-br9ii
    @EA-br9ii 2 года назад +1

    Thank you very much. You are truly a great Teacher

  • @federicoalvarez9494
    @federicoalvarez9494 2 года назад +1

    Thank you, greetings from Argentina

  • @TheSowikHD
    @TheSowikHD 4 года назад +8

    Very helpful stuff, thank you for explaining the little details! So far the only youtuber that I saw do this

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  4 года назад +6

      Oh I used to not explain the details and that ended up being MORE work for me because I spent all day trying to answer questions. hahah.
      Thanks for the comment.

  • @delllatitude299
    @delllatitude299 4 года назад +3

    I learned a lot from you. there are no words to say thanks to you. but I love you for what you are doing for us.

  • @SoulScribbler
    @SoulScribbler 3 года назад +1

    By the end of this video, the printed out message no longer has the body in an easily read format. Why is this? I fixed it by putting the print statement back in, but why did you take them out and do the append? It didn't seem to do anything (I"m assuming a line of code to use the appended data is what is missing)
    Great video by the way! This was very easy to follow and SIMPLE compared to a lot of tutorials on doing this. For anyone who is complaining about the speed at which he did these two things, trust me, this was much more simple and well thought out than other tutorials I've seen.

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  3 года назад

      Thanks!
      print will take string formatting into account; return statements don’t by default.
      It’s been a while since I did this one but that’s likely the reason

    • @SoulScribbler
      @SoulScribbler 3 года назад

      @@CodingEntrepreneurs This is what I figured as well. Thank you!

  • @akashthoriya
    @akashthoriya 3 года назад +2

    Can't thank enough although Thank you sir,
    My level of understanding in python is increasing day by day [All credit goes to you sir]

  • @briankoech4307
    @briankoech4307 4 года назад +1

    Brilliant and easy to follow. I went ahead and put the passwords into a .env file. Loving following this tutorial.

  • @bentwite3093
    @bentwite3093 4 года назад +1

    Loving the series... Can't wait to watch this episode

  • @atulkumaragrawal3890
    @atulkumaragrawal3890 3 года назад +1

    just awesome

  • @giridharraju3506
    @giridharraju3506 Год назад +1

    i am taking this course now, and the enable less secure apps feature is disabled in google mail. Can someone help me with that, please.

  • @joincryptouk
    @joincryptouk 3 года назад

    Awesome! thanks for the few extra tips I picked up :D

  • @amruthamu9967
    @amruthamu9967 Год назад +1

    Hey Sir, tried this but it is failing with error: b'LOGIN failed.', any idea how can we fix this. My username and password was correct .

  • @flx6470
    @flx6470 2 года назад

    This is briliant. Thank you for showing and explaining. I am thinking about controlling a raspberry pi in my home network by sending it previously defined commands by e-mail. This seems to be an easy way to do it. Not sure if it would be perfectly safe though... Anyway a great tutorial video! Best regards from Germany

  • @gabrielabarrera141
    @gabrielabarrera141 4 года назад +2

    thanks for sharing your knowledge, I love your tutorials, I've learned a lot from them. Greetings from Chile :)

  • @RohitSharma-tp3nh
    @RohitSharma-tp3nh 4 года назад +1

    Great content Justin. I am really enjoying learning Python through your video tutorials. I do have one suggestion though. I would be nice if you can also mention concepts as you are demonstrating. For example use of with statement ... is referred to as context manager.

  • @riddhijoshi8528
    @riddhijoshi8528 2 года назад +1

    Hi, so apparently Google discontinued the Less Secure App Access as of May 2022, so I wasn't able to do that part, and therefore am getting some error in my code right away. Do you have instructions for how to do this program with the current Gmail features? Thx

    • @coskee96
      @coskee96 2 года назад

      ruclips.net/video/g_j6ILT-X0k/видео.html here is the solution :)

  • @ql2332
    @ql2332 3 года назад +2

    Question: How to paste code into the terminal running as you do? Mine will end up a trunk of code which is not runnable. I have to paste line by line.

  • @gaganbaghel1377
    @gaganbaghel1377 3 года назад

    You are the bestt❤️❤️

  • @kuan-weihuang5214
    @kuan-weihuang5214 4 года назад +2

    so what should i learn from this section? memorizing all the syntax? i know you said in 24:00 that we don't have to. but then i just don't know what information should i take.
    if it's for some 'reference' , then maybe emphasize more about that reference, or else the 45min long video is just filled with syntax and that's just confusing.
    still, it's a good tutorial , thx for that, all i'm saying is that i can't catch the message it sent

  • @jeffkimani2996
    @jeffkimani2996 2 года назад

    nice videos thank you for your time..., if you are having problems because of the less secure apps that google change you can you app passwords it worked for me

  • @shrutisharma1904
    @shrutisharma1904 3 года назад

    Thank you so much for this video .

  • @alejandragutierrez1709
    @alejandragutierrez1709 4 года назад

    Worked on the first try, love your videos!!

  • @jprince2453
    @jprince2453 3 года назад

    Man if i ever get a job i goin to donate lot of money this is some good ** even if i dont fully understand but i now how to read the language so i believe that's good even when i went to give up i keep staying force

  • @susmithagudla2082
    @susmithagudla2082 2 года назад

    Helpful video , in the next video can you explain reading inbox using perl

  • @user-rt3bw3hb8v
    @user-rt3bw3hb8v 4 года назад

    Man, this is great stuff!!! Thanks man!

  • @lukerobertson1000
    @lukerobertson1000 4 года назад

    Thank you mate! Top content!

  • @118bone
    @118bone 4 года назад

    Just ran into your channel and I have to say it's a great tutorial, going step by step and explaining everything, subscribed

  • @tanuvigupta
    @tanuvigupta 3 года назад

    This is great information. Is there a way to parse through a Microsoft account to read emails and automate stuff.

  • @tanhongwai7091
    @tanhongwai7091 2 года назад

    Can we use python to reply email on a specific an email? I am using Outlook.

  • @LoverBoy-l5t
    @LoverBoy-l5t 6 месяцев назад

    yeah amazing but i can't type my code yet I get a note all the time from Visual Basic that not all the functions will work how do I bypass this or fixe and it is a new Visual Basic that is really difficult it a complete other view please reply me fast

  • @bruhhhhh718
    @bruhhhhh718 3 года назад +1

    this went from zero to sixty pretty fast lol

  • @MarisolsAdventures
    @MarisolsAdventures 4 года назад

    Hello, wondering if you could help me out on below issue:
    Somehow google blocked it when did send_mail
    Sign-in attempt was blocked for your linked Google Account

  • @ImSatish_raj
    @ImSatish_raj 2 года назад

    Please can you show, how to automate outlook mail sending with attachments in macbook using python

  • @karthikudupa5475
    @karthikudupa5475 3 года назад

    great!! so helpful, thanks a ton!

  • @rohitmethare1986
    @rohitmethare1986 3 года назад

    Can you pls help me , how do I scrap products prices on the first page of a specific category

  • @gaganbaghel1377
    @gaganbaghel1377 3 года назад

    Perfect ❤️❤️❤️❤️

  • @adg1711
    @adg1711 4 года назад

    fantastic videos!!

  • @cgenigma675
    @cgenigma675 2 года назад

    Hi man..if you still read comments, how do i select the primary option in gmail and not the social and promotions?

  • @faizanshaikh9380
    @faizanshaikh9380 3 года назад

    Hello
    I am getting IMAP error "user is authenticated but not connected" at line imap_server.select('inbox') after login statement. So what can we do in this case ? Can u plz help me ?

  • @gabrielabarrera141
    @gabrielabarrera141 4 года назад +1

    hi Justin, I have a question, if I have the second factor security, how can I login???

    • @dogebond6960
      @dogebond6960 4 года назад

      You can disable it or start a second account for this

  • @batumanav
    @batumanav 4 года назад

    Does it let you scrape the old emails that has been sent or received? Or just those that is done after using the script?

  • @moussaouihassib8533
    @moussaouihassib8533 2 года назад

    Great! tuto but i would like to know how i can use this exemple with reading inbox in outlook not in gmail

  • @dejan3315
    @dejan3315 3 года назад

    Thank you for your help. with this code i created a programm with wich i can remote my pc sending emails with my smartphone.
    sorry for my bad englisch

  • @peacekeepermoe
    @peacekeepermoe 2 года назад +2

    Great tutorial, unfortunately I cannot get the code to read the 'body' of the email. It reads the subject, date, etc., just not the body. I am not sure what has changed since 2020 when this tutorial was made. Anyone else experience this?

  • @mariosepulveda4378
    @mariosepulveda4378 4 года назад

    Great Video! Just one question, I have a html table that I already parse. But I need to save this table as a file. Could you help me?

  • @asvlogs2288
    @asvlogs2288 2 года назад

    how can we do the same from outlook ?

  • @anshumangupta5065
    @anshumangupta5065 3 года назад

    Shows error...
    I ran the code on vscode, but it gives
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags
    socket.gaierror: [Errno 11004] getaddrinfo failed
    error...any solutions?

  • @ahmadabdallah2896
    @ahmadabdallah2896 4 года назад +2

    Dude the line:
    _, data= mail.fetch(num, '(FRC822)')
    gives an error:
    imaplib.error: FETCH command error: BAD [b'Could not parse command']
    how can I solve this, please?

    • @CopycatEarl
      @CopycatEarl 4 года назад +3

      It is '(RFC822)', you switched the R and the F. This was 2 moths ago so I hope you were able to figure it out lol

  • @debanjanbarman7212
    @debanjanbarman7212 4 года назад +1

    Bro can do a series on making Rest API using Django.

  • @Soughandhika_197
    @Soughandhika_197 3 года назад

    Hi Sir,
    in my project i want to reply an email, in gmail how we are using sequence of mails .
    Can you help me on this Sir.

  • @PetraKArtep
    @PetraKArtep 3 года назад

    20:51 "....assert to_email != None..." produces the following error....exception: no description. I downloaded the original send.py from github => same result. Second, the line "response = send(name, to_email=email, verbose=True)" produces another exception error.....any idea? besides these little errors, your videos are awesome!

    • @jeremycollier4377
      @jeremycollier4377 3 года назад

      I"m no where near a master in Python, and you may have already figured out your problem, but are you running the same version of python as the video? This type of error (where it's throwing an exception when it doesn't receive something it thinks it should) are often caused by that. This is especially true since you said it even happened with the downloaded code.

  • @hbibamrani9890
    @hbibamrani9890 2 года назад

    Not all heroes wear capes.

  • @amitkadivar9445
    @amitkadivar9445 4 года назад

    How can get a particular label? like I have two label study and work and read only study mail then how can do this ?

  • @daneshwargobbani8693
    @daneshwargobbani8693 4 года назад

    damn..getting only those messages from all that HTML code which was not making sense at all.Awesome...

  • @uyghurtradingclub8543
    @uyghurtradingclub8543 3 года назад

    "html_part" underlined said unused variable.
    how do I solve it?

  • @abbadkamel8839
    @abbadkamel8839 3 года назад

    can i use the same thing with any websites ?

    • @SoulScribbler
      @SoulScribbler 3 года назад

      If you mean to read/send email from other services, then yes, as long as they have the protocol (smtp for sending, for example) then you can.

  • @ravikumarreddy3773
    @ravikumarreddy3773 3 года назад

    How to send an email from outlook using smtp Python , If you have any example share with us.

  • @mrflasterzero9595
    @mrflasterzero9595 4 года назад

    cool, keep it up , make it till day 365 ;)

  • @nehalbafna8915
    @nehalbafna8915 4 года назад

    Sir, what about the other encodings in MIME text part?

  • @mahalakshmikiran
    @mahalakshmikiran Год назад

    Is there any way we can click on the link in the email body using python

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  Год назад

      Yes, extract the link and either:
      - use selenium with python to automate a browser to go to the link
      - use Python requests to request a link (thus “clicking” it in a way)

  • @hemantsah8567
    @hemantsah8567 4 года назад

    I tried inbox.py on one of my useless gmail account and it was showing mails from the creation of that account i.e. 2013.
    How can I fetch the latest one....?

  • @3dln
    @3dln 4 года назад

    amazing! Can't wait to see more complicated subjects here :)
    and I thing Multipurpose Internet Mail Extensions (MIME) is pronounced like "mime" not "mim" or am I wrong?

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  4 года назад +1

      Oh yeah I think it’s an old habit of mine calling it “meme” instead of “mime” (ˈmīm)

  • @danielcarrionh5220
    @danielcarrionh5220 4 года назад

    my error
    "SMTP AUTH extension not supported by server.")
    smtplib.SMTPNotSupportedError: SMTP AUTH extension not supported by server.
    Help me ;(

  • @injeel_ahmed
    @injeel_ahmed 4 года назад

    How to reply to a thread or send a follow up email on the same previous thread instead of sending a totally new email??

    • @AdityaDas-yl6wy
      @AdityaDas-yl6wy Год назад

      did you get any solution to this, I am desperately looking for the code to reply to the same thread

  • @hamzakhalid9428
    @hamzakhalid9428 4 года назад

    Great tutorial. I still didn't get how the send.py file came from suddenly!

  • @augiblutz2852
    @augiblutz2852 2 года назад

    I could not find the cade at that link

  • @shrutisharma1904
    @shrutisharma1904 3 года назад

    I am getting this error . Can someone let me know why am I getting this error "socket.gaierror: [Errno 11001] getaddrinfo failed" ?

  • @orkhangasanov
    @orkhangasanov 3 года назад

    Hi there, can anyone help me, how to encode mails with cyrillic body?

  • @ManikandanM-wz2vb
    @ManikandanM-wz2vb 3 года назад

    I've tried this...but the email is not sent..what could be thre reason for that..

  • @JuanBorque
    @JuanBorque 4 года назад

    I keep getting an Assertion error with the send.py file:
    ['c:/Users/jborq/Python Venv/Dev/30Days/Day9Email/send.py']
    Traceback (most recent call last):
    File "c:/Users/jborq/Python Venv/Dev/30Days/Day9Email/send.py", line 32, in
    response = send(name, to_email=email, verbose=True)
    File "c:/Users/jborq/Python Venv/Dev/30Days/Day9Email/send.py", line 9, in send
    assert to_email != None
    AssertionError

    • @tudututadata7011
      @tudututadata7011 4 года назад

      got the same issue. i just deleted "assert to_email != None" in send.py and it worked

  • @isaisovic7666
    @isaisovic7666 3 года назад

    Does someone know how to read attachments in python?

  • @enisten
    @enisten 4 года назад

    31:22 What is '(RFC822)'?

  • @lemmetest4917
    @lemmetest4917 3 года назад

    getting indentation error on VS code even with whole code copied , help !

  • @gouemoregis334
    @gouemoregis334 3 года назад

    File ".\send_email.py", line 22, in send_email
    msg_str = msg.as_string()
    AttributeError: 'tuple' object has no attribute 'encode'
    Help please Thanks

  • @marconarca2706
    @marconarca2706 4 года назад

    If anyone is having a problem regarding not connecting to Gmail just go to Google and search less secure apps then turn on

  • @socrates_the_great6209
    @socrates_the_great6209 3 года назад

    The code at 15:00 does not work 2021 at all. Several errors even when copy pasting his own code and running it.

    • @jeremycollier4377
      @jeremycollier4377 3 года назад

      Are you using the same version of Python as him? Sounds like you're probably using a newer version and that's why it's not working.

  • @soboropansawaraaaa
    @soboropansawaraaaa 3 года назад

    read mails: 29:28

  • @MandeepKumar-ue3zy
    @MandeepKumar-ue3zy 4 года назад +2

    Bro nice content by ur r not explaining thinks

  • @wackamottos
    @wackamottos 3 года назад +4

    I had to dislike this video. You clearly put a lot of effort in it however for a Python beginner playlist you went too far too soon. A lot of the areas you cover in the video are not well explained, some are not explained at all. You have to understand that beginners struggle with the concepts of programming and language syntax a lot. The things that you can type at the top of your head take us long time to wrap our minds around. I will still probably watch the other videos but this left me disappointed and feeling way out of my scope. If you read this, please keep my comment in mind for your future videos that target beginners in any area of learning. We are here to learn something new, not to watch a guy brag at his great programming skills. Take it slower.

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  3 года назад +4

      Thanks for the feedback. It’s impossible to teach all people at all ends of the comprehension spectrum.
      I recommend writing all the questions you have when you have them, do a quick search for them, and resume the video. That’s what I do and how I learn from others.
      Cheers!

    • @commonsense1888
      @commonsense1888 3 года назад +1

      i agree with the comment here. a

  • @meylyssa3666
    @meylyssa3666 2 года назад

    There is a way to get body of an email
    msg = email.message_from_bytes(data[0][1],
    policy=email.policy.default)
    body = msg.get_body(('plain','html'))
    body.get_content()