Send Emails With Python [UPDATED]

Поделиться
HTML-код
  • Опубликовано: 3 авг 2022
  • In this video you'll learn the new way on how to send emails with python.
    Download All Free Resources - codewithtomi.eo.page/mz396
    Subscribe To My Newsletter and Get A Free Python Handbook:
    www.codewithtomi.com/p/newsle...
    If You Enjoy This Video, please subscribe to the channel
    Patreon - / tomitokko
    Newsletter - www.codewithtomi.com/p/newsle...
    Buy me a coffee - www.buymeacoffee.com/tomitokko
    #python #codewithtomi #pythonprojects
  • НаукаНаука

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

  • @tkeus991
    @tkeus991 Год назад +6

    After trying like 3 different approaches with Google API, and 1 using Yahoo API, your solution finally worked ! Bless you man ! I wish you all the best and thank you once more !!!

  • @HarshKumar-ip5nr
    @HarshKumar-ip5nr Год назад +1

    Thanks man, was getting smtp error and there was no tutorial that helped. Keep the good work coming.

  • @waltercumbucane1557
    @waltercumbucane1557 Год назад +3

    Thanks Tomi. You helped me so much with this tutorial❤

  • @ramizulislam5284
    @ramizulislam5284 2 года назад +5

    Thanks a lot for this sir.. I was really in search for the method .! ❤

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

    Thanks a lot man, I've been searching for how to do this for weeks

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

    Have been waiting for this ❤️

  • @donaldallen2922
    @donaldallen2922 7 месяцев назад

    Top Notch because this is the one tutorial that worked. Thank you bro!

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

    Thanks a ton tomi !❤️

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

    very instructive, thanks a bunch!

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

    I love your accent man! Keep on going with those useful videos!

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

    Excellent Tomi and thanks so much

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

    This worked great, thank you.

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

    Thanks so much ! You helped me a lot

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

    Great job !

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

    Thanks, this is work dude!

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

    Thank you, Google was not letting me use my default password, and I had to use your guide to make it work!

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

    Nice video. This helped me a lot

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

    Thanks a lot bro. Works great

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

    Great video thank you!

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

    Thanks Bro, It helped me alot

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

    Thanks bro, nicely explained ;)

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

    Thank you so much for this

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

    Thanks for this tutorial, I tried it with only smtp module but I kept getting the timeout error, but everything worked after following your tutorial.

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

    it worked !!! thank you😘

  • @harshmirdhwal
    @harshmirdhwal 8 месяцев назад +1

    Thanks bro!

  • @AliRachid
    @AliRachid 10 месяцев назад

    Thank you very much, sir.

  • @JamesWilson-tc4lq
    @JamesWilson-tc4lq Год назад

    THANK YOU SO MUCH 😀😀

  • @user-de1kz7oz6d
    @user-de1kz7oz6d 2 месяца назад +1

    Helped alot

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

    Thanks a lot this really helped I had tried different methods I kept getting error messages till I tried yours

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

    it works thank you

  • @fullStackInKannada
    @fullStackInKannada 7 месяцев назад

    Thank you it worked for me :)

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

    Thank You so much

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

    Thank You so much Bro

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

    thanks it really solved my problem

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

    keep up the good work!

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

    Hi, Thank you so much for video, 😍

  • @narenvasist7562
    @narenvasist7562 11 месяцев назад

    thanks a ton!

  • @tolulope.j
    @tolulope.j 2 года назад

    Thanks, I really needed this. Can you do the one of sending html templates using python, I have been battling with this

  • @divindhikshith8053
    @divindhikshith8053 8 месяцев назад +1

    This Email part which you thought was really helpful which is a great part of my LIBRARY MANAGEMENT SYstem which sends Mail to the students who borrows book sfrom the library

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

    Awesome bro,

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

    amazing!

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

    It's working! Thank you!

  • @NayyarAbbas-sh1vw
    @NayyarAbbas-sh1vw 9 месяцев назад

    Thank you :)

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

    Thank you so much dude! This worked really well!

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

      Bro calls land ho raha hai ?

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

      @@akashdey7788 Huh?

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

      @@andeheri he is asking if the calls are landing

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

    thanks a lot sir

  • @markostr
    @markostr 9 месяцев назад

    Thanks !!!!

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

    very useful it has works perfectly for me thanks

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

    Man Thank you so much For This

  • @bobvila-lz8px
    @bobvila-lz8px Год назад

    SUBSCRIBED MY MAN HOLY SHIT!!! IT WORKED!!!

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

    East and west, respected Tomi is best

  • @user-ip3jt5wz1b
    @user-ip3jt5wz1b 2 месяца назад

    Was only having problems with the url, spen over an hour😅. I'm subscribing🤗

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

    Amazing video,the guy explain very well and the code run,i love this video

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

    Its working😘😘😘

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

    Thanks for the video but i had an error like that:
    smtplib.SMTPAuthenticationError: (534, b'5.7.9 Application-specific password required.

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

    Do we need RDP also ?? To inboxin ?

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

    How about reading the emails? Can you please make a video about that too

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

    This is helpful. In the file you created to store the password did you enter any special code or simply just pasted the password in there and saved it?

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

      Just declared a variable called password and assigned it the string value of the actual password.

    • @swansverse
      @swansverse 10 месяцев назад

      email_password = 'myPassword123'

  • @user-qd6jq7kf6k
    @user-qd6jq7kf6k 7 месяцев назад

    Hey brother, can you help me out with IP rotation.
    I want to send mails with rotating IP after each sent mail

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

    Is this secure with using SSL?

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

    Video on ews read mail pls

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

    how do you attach files on email?

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

    King👑

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

    how to change the email sender mail from my gmail to another mail id ?

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

    How to attached any attachments

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

    it didn't work. i keep getting recipent address is invalid. i've changed the recipents address couple of times still doesn't send

  • @DefAir_
    @DefAir_ 2 месяца назад

    Please tell me, is it currently possible to log in to your account using an application password? For some reason, I do not accept this password when logging in.

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

    Nice video Sir please I need the source code please 🙏

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

    can you share the code

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

    import EmailMessage shows me the error "No module named 'EmailMessage', did someone encounter this problem as well?

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

    I am using yahoo email ID as sender email where I am getting an error msg. as ---AttributeError: 'function' object has no attribute 'wrap_socket' Please help

  • @malusmundus-9605
    @malusmundus-9605 Год назад

    If this works I'll sub

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

    I'm getting this error - SMTPServerDisconnected("Connection unexpectedly closed")

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

    Does anyone know if this is still working as of Feb 2023? Has gmail somehow hard blocked access to third party applications requesting authentication to they’re SMTP servers? I keep getting a ssl.SSLError which the error code reflects “SSL: WRONG VERSION_NUMBER”

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

      you might need to update your openssl

  • @Idk-what-to-change-it-to
    @Idk-what-to-change-it-to Год назад

    What do I pip install for app2?

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

      You don't, app2 is a python file he created himself and it's just a place for him to safely store his app password. You don't need it, you can just put the password into the variable.

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

    Which IDE do you use here?

  • @firstplaceconnect6716
    @firstplaceconnect6716 Год назад +5

    I have tried everything. I am still getting a 501 error. SMTPAuthenticationError(code, resp)

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

      idk if you still need help but the password is the pass that he made at 1:57 . you dont put your actual email password. hope this helps :)

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

      @@jhonathanherrera165 thanks man i love you

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

    Don't name your file email.py or else you will get errors when you try to run it.

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

    Hey I am getting an error while running this code. it says certificate verify failed.

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

      idk if you still need help but the password is the pass that he made at 1:57 . you dont put your actual email password. hope this helps :)

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

    Hi!
    It a outstanding video, new sub. The problem it cannot send Emails to others Gmail accounts.
    Could you make a video explain how make it, please?

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

      If you are not getting any error. You should check your spam.

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

    what is the number 465?

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

      pretty sure its a local host number, but not too completely sure

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

    Hii I got a error that there is no module named app2

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

      app2 is just a file that he made with his password to hide from us. You need to put in the password that you made like he did at 1:57

  • @jahzealibeh3492
    @jahzealibeh3492 9 месяцев назад

    hi Tomi i cant find app password, im having dificulties

    • @mufidakhbar5344
      @mufidakhbar5344 Месяц назад

      same problem, have you found the solution?

  • @vaniperumal7151
    @vaniperumal7151 5 месяцев назад

    Getting Timeout Error

  • @abdulazizjamshidi425
    @abdulazizjamshidi425 Месяц назад

    app passwords no longer exist in the google account manager

    • @mufidakhbar5344
      @mufidakhbar5344 Месяц назад

      have you found the solution?

    • @abdulazizjamshidi425
      @abdulazizjamshidi425 28 дней назад

      @@mufidakhbar5344yes the option is removed however there was a link i found somewhere online that took you to app passwords

    • @abdulazizjamshidi425
      @abdulazizjamshidi425 21 день назад

      @@mufidakhbar5344yea

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

    smtplib is dead...

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

      Not anymore since this is a new way to use it since the Gmail update

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

    Hindi wale like kro

  • @zstar8397
    @zstar8397 7 месяцев назад

    Hey hope you are doing alright just I wanna say that
    GOD loved the world so much he sent his only begotten
    son Jesus to die a brutal death for us so that we can have eternal life and we can all accept this amazing gift this by simply trusting in Jesus, confessing that GOD raised him from the dead, turning away from your sins and forming a relationship with GOD.

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

    Great work Tomi, I really love what ayou doing bro, can you send email to any email address or just Gmail.

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

      Any email address

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

      @@CodeWithTomi how do we use other email address(e.g yahoo, etc)

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

    Not sure what is wrong with my app. I have gone over the code several times and still get this error:
    socket.gaierror: [Errno 11001] getaddrinfo failed

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

      Eventually had to use "smtp.send_message(em)" instead of smtp.sendmail(email_sender, email_receiver, em.as_string())

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

    Hello Tomi, I'm getting following errors:
    ```Traceback (most recent call last):
    File "/Users/aya/Documents/Projects/my-internal-proj-app/python/PWH Python/send_email/send_email.py", line 25, in
    with smtplib.SMTP_SSL('smtp.gmail.com',465,context=context) as smtp:
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/smtplib.py", line 1050, in __init__
    SMTP.__init__(self, host, port, local_hostname, timeout,
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/smtplib.py", line 255, in __init__
    (code, msg) = self.connect(host, port)
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/smtplib.py", line 341, in connect
    self.sock = self._get_socket(host, port, self.timeout)
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/smtplib.py", line 1057, in _get_socket
    new_socket = self.context.wrap_socket(new_socket,
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1071, in _create
    self.do_handshake()
    File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)```
    Appreciate someone's help here...