How To Send Email With Django - Python Django Dentist Website #7

Поділитися
Вставка
  • Опубліковано 6 січ 2025

КОМЕНТАРІ • 206

  • @Codemycom
    @Codemycom  5 років тому +30

    UPDATE: You may have to set the email port without quotes....
    EMAIL_PORT = 587

    • @raspberry9417
      @raspberry9417 4 роки тому

      how about port 465, do you have demos?

    • @SaeedAlFalasi
      @SaeedAlFalasi 4 роки тому

      that explained ! thank you :D

    • @ilungantita8419
      @ilungantita8419 4 роки тому

      Thanks a lot, really helped

    • @killcam8071
      @killcam8071 2 роки тому

      Traceback (most recent call last):
      File "C:\arshia\Website\manage.py", line 22, in
      main()
      File "C:\arshia\Website\manage.py", line 18, in main
      execute_from_command_line(sys.argv)
      File "C:\arshia\Website\lib\site-packages\django\core\management\__init__.py", line 425, in execute_from_command_line
      utility.execute()
      File "C:\arshia\Website\lib\site-packages\django\core\management\__init__.py", line 419, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
      File "C:\arshia\Website\lib\site-packages\django\core\management\base.py", line 373, in run_from_argv
      self.execute(*args, **cmd_options)
      File "C:\arshia\Website\lib\site-packages\django\core\management\base.py", line 417, in execute
      output = self.handle(*args, **options)
      File "C:\arshia\Website\lib\site-packages\django\core\management\commands\sendtestemail.py", line 29, in handle
      send_mail(
      File "C:\arshia\Website\lib\site-packages\django\core\mail\__init__.py", line 61, in send_mail
      return mail.send()
      File "C:\arshia\Website\lib\site-packages\django\core\mail\message.py", line 284, in send
      return self.get_connection(fail_silently).send_messages([self])
      File "C:\arshia\Website\lib\site-packages\django\core\mail\backends\smtp.py", line 102, in send_messages
      new_conn_created = self.open()
      File "C:\arshia\Website\lib\site-packages\django\core\mail\backends\smtp.py", line 69, in open
      self.connection.login(self.username, self.password)
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\smtplib.py", line 750, in login
      raise last_exception
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\smtplib.py", line 739, in login
      (code, resp) = self.auth(
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\smtplib.py", line 662, in auth
      raise SMTPAuthenticationError(code, resp)
      smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at
      5.7.8 support.google.com/mail/?p=BadCredentials e22-20020a170906505600b006da7d71f25csm1152188ejk.41 - gsmtp')

    • @killcam8071
      @killcam8071 2 роки тому

      help me please

  • @adrianm.zapata6644
    @adrianm.zapata6644 9 місяців тому +6

    Nice to have a young Walter White explaining these kind of things. Greetings from Chile.

  • @Codemycom
    @Codemycom  5 років тому

    ▶️ Watch Entire Money Making Playlist ✅ Subscribe To My UA-cam Channel:
    bit.ly/2tEBTzg bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com
    Take $30 off with coupon code: youtube1

  • @bfarhan8
    @bfarhan8 3 роки тому

    Ok, I start hating Django yesterday and was thinking about a career change, but now i am saying Django is awesome :D

  • @grayfox_yt
    @grayfox_yt 2 роки тому +4

    Less secure apps is no longer supported by Google. You need to enable 2 factor and set an app password in the google account. This way your email is not compromised by allowing less secure apps.

    • @Gabriel-ql7eb
      @Gabriel-ql7eb 4 місяці тому

      and when hosted my site online, i don't have to use this smtp server thing in the video at 8:57, right?

  • @apex4462
    @apex4462 2 роки тому +1

    when i am using the request.POST method for name and other details like email, it doesn't get any value for the placeholder.

  • @vijaykumarkarnan5223
    @vijaykumarkarnan5223 4 роки тому +1

    your way of explanation is too good. please upload more videos.

  •  4 роки тому

    thanks man, very helpful video. keep up the good work.

  • @mshoaib6106
    @mshoaib6106 4 роки тому +1

    Excellent , Most Fav Instructor ever. LOVE YOU.:)

  • @rubinashrestha1861
    @rubinashrestha1861 3 роки тому +2

    Heyy, I did exactly the same thing as shown in the video but for some reason I am getting an error saying SMTPServerDisconnected. I have tried finding solution to the problem everywhere but I don't seem to find it.

  • @alexdin1565
    @alexdin1565 2 роки тому +1

    please can you add an email tracker to check when receiver open URL

  • @raunakghawghawe4921
    @raunakghawghawe4921 3 роки тому +1

    Got this error, please help :
    [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

  • @lissankoirala
    @lissankoirala 4 роки тому +1

    Thanks for this wonderful video sir, really helpful!

    • @Codemycom
      @Codemycom  4 роки тому +2

      Glad it was helpful!

  • @avishekthapa1774
    @avishekthapa1774 4 роки тому +1

    in the send_mail function what is the point of writing message_email since the email we get is from the email we set in the settings files?? and also why does it work like this?

    • @zekafarzali6816
      @zekafarzali6816 3 роки тому +1

      exactly, I was so confused why I receive an email from myself. Then it kicked in, it doesn't look right)

  • @eugenekwaka
    @eugenekwaka 4 роки тому

    When I run the code in the browser at 11:24 I get a 'UnicodeError at /Contact.html/ encoding with 'idna' codec failed(UnicodeError: label empty or too long) ' I wonder what the problem is

    • @caelim3524
      @caelim3524 4 роки тому

      same I did some googling and it appears to be an error with windows. I couldn't find a fix

  • @ricardofernandez2286
    @ricardofernandez2286 2 роки тому +2

    Hi, thank you very much for these great tutorials!
    On this particular one I'm getting a couple of deprecation messages:
    C:\Python\lib\smtpd.py:105: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio
    import asyncore
    C:\Python\lib\smtpd.py:106: DeprecationWarning: The asynchat module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio
    import asynchat
    How do you think we should transition from this solution to one that uses the new suggested library?
    Thank you very much!
    Warm regards
    Ricardo

  • @J2LProductions
    @J2LProductions 4 роки тому +3

    Everything works great! Awesome tutorial!! The only problem I have is that when someone sends me an email, the email sender is my own and doesn't show me the email that they typed in the email input. My code is exactly like yours.

    • @Codemycom
      @Codemycom  4 роки тому

      Are you sure it's exactly the same?

    • @bektursunsamatuulu9772
      @bektursunsamatuulu9772 4 роки тому

      Hi?
      Did you fix your problem? It seems like, the same problem that I am having now.

    • @R3N3C3K
      @R3N3C3K 4 роки тому

      All of us have the same problem. I believe all of us are using the google smtp server and that will be the most probable problem... I believe Codemy's code works in the console. But when you switch to the google smtp, then the sender is the EMAIL_HOST_USER and not the email set in the form. Following code can redirect all information into message body. Unfortunately, I do not know how to print Full Name; Email Address; and Message fields at separate lines of the body text... :-( But I have the data.
      send_mail(
      'message from ' + message_name, # email_subject
      'Full Name: ' + message_name + '; Email Address: ' + message_email + '; Message: ' + message, # message
      message_email, # from email
      ['recepient1@example.com', 'recepient2@example.com'], # To Email
      )
      Or we can google how to force gmail to redirect sender from EMAIL_HOST_USER to the email address value set in the form. I has not been successful yet. But I believe there is some hidden magical switcher.

    • @R3N3C3K
      @R3N3C3K 4 роки тому +1

      I have done some review and result posted at stackoverflow. It appears it is not posible to set properly the sender via gmail smtp. But I have quite solved the problem here:
      stackoverflow.com/questions/61518299/django-python-email-form-is-not-forwarding-senders-email-address-via-gmail-smtp

    • @jenilchudgar
      @jenilchudgar 3 роки тому

      @@R3N3C3K You can use '
      '

  • @FarhatJahan
    @FarhatJahan 4 роки тому +2

    Hi, this video was really helpful. But I am facing one problem, i have app password and gmail account along with 2 factor authentication, but the received mail TO and FROM showing the same email id i.e. my own emial id. But when i tried with DebbungingServer everything was as expected.

    • @FarhatJahan
      @FarhatJahan 4 роки тому +1

      I have understood why we should not be using user's email address in from field: stackoverflow.com/questions/62620601/to-and-from-return-the-same-email-id-in-django-send-mail

  • @bastiantokusumajaya4337
    @bastiantokusumajaya4337 3 роки тому

    Is it better to use commercial email like gmail etc or it is better to setup our own mail server like using postfix?

  • @killcam8071
    @killcam8071 2 роки тому

    nice job man❤❤❤

  • @abdullahhazari918
    @abdullahhazari918 3 роки тому

    I love you men you solve my problem with google ! :D

  • @tudordraghici6154
    @tudordraghici6154 3 роки тому +1

    Hei Jon, I have a question. I still did not manage to send an email. Some time passed and nothing happens. Can you please give me a hand over here ?
    PS. Great job, please keep up the good work you've done

  • @rootuser5652
    @rootuser5652 4 роки тому

    i watched this video exactly one year AFTER the release lol. PS. google security is better than.. nevermind haha NICE VIDEO!

  • @ai.201
    @ai.201 5 років тому

    Thanks Sir. You are doing great job.

  • @gamingzonebk5943
    @gamingzonebk5943 4 роки тому

    Really helped me great thanks for the video

  • @Ism-x8f
    @Ism-x8f 4 роки тому

    So Im stuck on something it could bea really dumb little thing that I am stuck on but I can't seem to grasp how you kept the local:8000 and the local:1025 at the same time and when I make two two git bashes for each I get a error for the localhost:8000? what should I do?

    • @Codemycom
      @Codemycom  4 роки тому

      The two things shouldn't have anything to do with each other. What;s the error?

    • @Ism-x8f
      @Ism-x8f 4 роки тому

      @@Codemycom the error shows that send_mail( has a problem
      ^

    • @Ism-x8f
      @Ism-x8f 4 роки тому

      @@Codemycom I tried everything and it still doesn't work 😥

  • @rahulrajeev9879
    @rahulrajeev9879 Рік тому

    🔥poli sanam 💫

  • @fakeavangchhia3131
    @fakeavangchhia3131 2 роки тому

    Hello John! I really appreciate for all your tutorials but I am having a problem that the template I am using on my website does not have a contact.html instead it's have contact.php in forms how will i use this php forms
    can i please get help

    • @Codemycom
      @Codemycom  2 роки тому

      There might be some way to hack it, but I wouldn't know it. PHP doesn't work with Django.

  • @thinhtran7268
    @thinhtran7268 3 роки тому +1

    SMTP AUTH extension not supported by server. Help me, please

  • @karthikkumarmv9101
    @karthikkumarmv9101 4 роки тому

    Sir I want send more input tag data at the place of massage in send mail function (I mean msg1,msg2...etc)wt should I want to do

  • @technologybysrk8419
    @technologybysrk8419 2 роки тому

    Thank you for what you do for us

  • @esspi9
    @esspi9 4 роки тому

    Hey! Was this a part of any playlist?
    It says #7, but I couldn't find a django dentist playlist on your channel.

    • @Codemycom
      @Codemycom  4 роки тому

      Link in the comment section: bit.ly/2tEBTzg

  • @ange-dev854
    @ange-dev854 2 роки тому

    thanks sir for that
    but now i can't send email i got error smtpauthenticationerror and i can't turn on less secure app please help me

  • @jakezimmerman9822
    @jakezimmerman9822 4 роки тому +2

    I have this working locally, but for some reason, I get an SMTPAuthentication error when trying to deploy on heroku. Anyone else have this issue?

    • @jakezimmerman9822
      @jakezimmerman9822 4 роки тому +1

      I decided to use mailgun instead of django's send mail function and it worked. Pretty much a copy/paste replacement.
      documentation.mailgun.com/en/latest/quickstart-sending.html#send-via-api
      Also, I wasn't installing my dependencies to my virtual env with pipenv install, and was seeing a bunch of ModuleNotFound errors.

    • @mahdidaoud
      @mahdidaoud 3 роки тому

      maybe the error because you didn't set the .env in geroku itself

  • @nowyouknow2249
    @nowyouknow2249 5 років тому

    Thanks
    It was really helpful

    • @Codemycom
      @Codemycom  5 років тому

      Awesome, glad it was helpful!

  • @Shivam-sf5im
    @Shivam-sf5im 6 місяців тому

    hi sir what is the Windows equivalent command for this --->>
    python -m smtpd -n -c DebuggingServer localhost:1025
    Does this still work ??

  • @ameerhbaig
    @ameerhbaig 4 роки тому

    Thanks for this tutorial :)

  • @hetshah7743
    @hetshah7743 3 роки тому

    [Errno 11003] getaddrinfo failed
    I am getting this error, even after importing socket in settings.py
    Any solutions ?

  • @joudalshuaibi2712
    @joudalshuaibi2712 4 роки тому

    Hello,
    Thank you for your amazing videos.
    I have one question,
    I sent an HTML Email through Django but i need to take the users (who receives the email)'s response ( it's either Accept or reject through Radio button). how can i take the response in any way . I'm open to all solutions.
    Thank you in advance.

  • @engaligamalengaligamal
    @engaligamalengaligamal 4 роки тому

    Thanks... Video Helps :)
    can you used map google in django

  • @sanketkumar_coder
    @sanketkumar_coder Рік тому

    Google doesn't use less secure apps anymore, what are the alternatives?

    • @Citiciti1717
      @Citiciti1717 11 місяців тому +1

      Hello, you probably dont need this anymore but for anyone who does, you go to Security in your gmail account, then enable 2FA (2 factor authentication) and then you make an app password, copy it and paste it in the settings email password and thats about it! Hope this helped!

    • @sanketkumar_coder
      @sanketkumar_coder 11 місяців тому

      @@Citiciti1717 I also figured it out . thanks :)

    • @Gabriel-ql7eb
      @Gabriel-ql7eb 4 місяці тому

      @@Citiciti1717 hi, how about smtp local server thing from video? Do we use it still while site is hosted online?

  • @SaeedAlFalasi
    @SaeedAlFalasi 4 роки тому +1

    If anyone has errors using the send_mail() function you have to pass the arguments in the exact order send_mail(subject, message, from_email, recipient_list) I ended up concatenating message_name with message_subject and message_email with message_phonenumber as i required the persons phone number.

    • @Codemycom
      @Codemycom  4 роки тому

      interesting

    • @psicologiaobversa
      @psicologiaobversa 4 роки тому

      I have this error with send_mail(
      And:
      Exception value: SMTP AUTH extension not supported by server
      I’m using:
      message_subject,
      message,
      message_email,
      [myemail@email.com],
      )
      I have changed the order several times and still got error on that.

    • @SaeedAlFalasi
      @SaeedAlFalasi 4 роки тому

      @@psicologiaobversa the error says the server is not accepting the authentication or its unsupported

    • @psicologiaobversa
      @psicologiaobversa 4 роки тому

      Any idea on that?

  • @sameergaikwad1885
    @sameergaikwad1885 4 роки тому

    Thanks... Video Helps :)

  • @AnnoyingErrors41
    @AnnoyingErrors41 4 роки тому

    Production version at 14:37

    • @Codemycom
      @Codemycom  4 роки тому +1

      ok

    • @AnnoyingErrors41
      @AnnoyingErrors41 4 роки тому

      @@Codemycom LOL, just for people looking for a quick fix. No taunts!

  • @alexx1466
    @alexx1466 2 роки тому

    please make a video of how to connect to databases . i have the error of database coneccion error

    • @Codemycom
      @Codemycom  2 роки тому

      I have tons of videos on that on my channel.

  • @ryan_0337
    @ryan_0337 5 років тому

    Thanks for the video.
    Do you know how we could send a text in a phone number in what app ?
    Morover,
    I smashed the like button since I saw the video

    • @Codemycom
      @Codemycom  5 років тому

      Thanks for smashing the like button! It's my favorite thing. Yes you can send a text message, but it's too complicated to talk about here...maybe I'll do a video on it later.

    • @ryan_0337
      @ryan_0337 5 років тому

      @@Codemycom ok and are you going to explain how to deploy the app ?

    • @Codemycom
      @Codemycom  5 років тому +1

      @@ryan_0337 yes

    • @SaeedAlFalasi
      @SaeedAlFalasi 4 роки тому

      @@ryan_0337 Look at Amazon SNS service for SMS texts, whatsapp you would prob need to register a business account with them im sure they have documentations on it

    • @SaeedAlFalasi
      @SaeedAlFalasi 4 роки тому

      @@Codemycom I seen an whatsapp python API using twilio but havent messed around with it yet. i couldnt find any other python whatsapp for business APIs

  • @hibas7568
    @hibas7568 4 роки тому

    hi :) I have 'phone number ' on my contact form..but im not able to send it through send_mail. Is there any other way to send mail where i can add other parameters i want?

    • @dmytrozimin7240
      @dmytrozimin7240 4 роки тому +2

      Maybe you can try to put it to the message by concatenating it, thus you would get the mobile number inside the message. Just an idea:)

  • @troyforrester1991
    @troyforrester1991 4 роки тому

    Respect for this one

  • @ДенисМаслов-у2е
    @ДенисМаслов-у2е 3 роки тому

    Thank you very much!!

  • @srivallisb2309
    @srivallisb2309 4 роки тому

    Hi, I liked this video, but I wanted to know how to send reminder emails at a specific time. Can you help me out?

    • @pranavrawlani111
      @pranavrawlani111 4 роки тому

      you have to use cron jobs with it

    • @pranavrawlani111
      @pranavrawlani111 4 роки тому

      ua-cam.com/video/5jaESVKqUs4/v-deo.html this link should help

  • @bektursunsamatuulu9772
    @bektursunsamatuulu9772 4 роки тому

    Thank you for the videos. I appreciate it. I have one question to make sure.
    Now, I am using the second way of sending an email. My question when users fill out the form Get In Touch, I am receiving an email to my account but I have no idea who is sending it. How can I know who filled out the form? I want to know person's email for a reply to him/her later, as it says, - "We received your email and will respond shortly..." Somehow, I need to know an email of the user in order to reply back. Right?
    Looking forward to your reply.
    Thanks again.

    • @Codemycom
      @Codemycom  4 роки тому

      Didn't I cover that in the video?

    • @bektursunsamatuulu9772
      @bektursunsamatuulu9772 4 роки тому

      @@Codemycom Do you mean this one, 4:44 ?
      Here is my code:
      def contact_us(request):
      if request.method == 'POST':
      message_name = request.POST.get('message-name')
      message_email = request.POST.get('message-email')
      message = request.POST.get('message')
      # send an email
      send_mail(
      message_name, # subject
      message, # message
      message_email, # from email
      ['example@gmail.com'], # To Email
      )
      return render(request, 'dent/contact.html', {'message_name': message_name})
      return render(request, 'dent/contact.html', {})
      What's wrong?

    • @bektursunsamatuulu9772
      @bektursunsamatuulu9772 4 роки тому

      Updated. No need to reply. Thanks.

    • @suhanisinha21
      @suhanisinha21 4 роки тому +1

      @@bektursunsamatuulu9772 hey! I am still not receiving the email of the person filling out the form. How did you get it? Please help.

    • @bektursunsamatuulu9772
      @bektursunsamatuulu9772 4 роки тому

      @@suhanisinha21 heeey sorry for late.. Is it works now?

  • @delllatitude299
    @delllatitude299 5 років тому

    awesome video.
    i have a quick question. how many emails we can add into SentToEmail List .

    • @Codemycom
      @Codemycom  5 років тому +1

      you can't use them to send spam, if that's what you're asking.
      docs.djangoproject.com/en/3.0/topics/email/#send-mass-mail

    • @delllatitude299
      @delllatitude299 5 років тому

      @@Codemycom kind of. basically i want to send mulitple emails to different peoples at a time. we can use loop or something iterations. but i want to know the best practice to do this so we can avoid to send mails in spam folder. I hope you got my point.

    • @Codemycom
      @Codemycom  5 років тому

      @@delllatitude299 Yeah, check that link I posted...that's the django docs for sending multiple emails...

    • @delllatitude299
      @delllatitude299 5 років тому

      @@Codemycom thanks. really appreciated your quick response. Please keep posting good content.

    • @Codemycom
      @Codemycom  5 років тому

      @@delllatitude299 Will do!

  • @AntonioOrdaz1
    @AntonioOrdaz1 4 роки тому

    Is it better to do it with CBV?

    • @Codemycom
      @Codemycom  4 роки тому +1

      Not better, just different.

  • @deadandgone70
    @deadandgone70 4 роки тому

    The two factor authentication one works but the less secure app way doesn't as of November 2020

  • @tamiltechguyz7264
    @tamiltechguyz7264 3 роки тому

    Sir I am following all your videos but request to share ne the roles and permission access to templates in decorators

    • @Codemycom
      @Codemycom  3 роки тому

      What are you talking about? There's nothing to share

    • @tamiltechguyz7264
      @tamiltechguyz7264 3 роки тому

      @@Codemycom share me the decorator tutorials on django

  • @mohitkothari3300
    @mohitkothari3300 4 роки тому

    my command prompt showed me details of the email but I haven't received it. So the module worked but only 50%

    • @Codemycom
      @Codemycom  4 роки тому +1

      Yeah it's a hacky sort of thing...

  • @rangabharath4253
    @rangabharath4253 5 років тому +1

    Thank you so much

    • @Codemycom
      @Codemycom  5 років тому

      You're very welcome!

  • @sabinkatwal8185
    @sabinkatwal8185 5 років тому +1

    Thank you sir.

  • @nafiyad1950
    @nafiyad1950 4 роки тому

    What is your django version

    • @Codemycom
      @Codemycom  4 роки тому

      Not the latest version

  • @janicesombillo8147
    @janicesombillo8147 4 роки тому

    why is that when i send email the sender is always the receiver?

    • @Codemycom
      @Codemycom  4 роки тому

      because that's how you set it up in your code.

    • @janicesombillo8147
      @janicesombillo8147 4 роки тому

      But my code is exactly like yours and its not showing the senders email

    • @janicesombillo8147
      @janicesombillo8147 4 роки тому

      @@Codemycom please help

    • @Codemycom
      @Codemycom  4 роки тому

      @@janicesombillo8147 Just look at the code, you must have the same email twice...right? That's not correct if you want to send email to two different email addresses...

    • @janicesombillo8147
      @janicesombillo8147 4 роки тому

      @@Codemycom the problem is it doesnt show the senders email

  • @amanjain6680
    @amanjain6680 3 роки тому

    Why do i alway get connectionAbortedError?

  • @Kruiger1993
    @Kruiger1993 3 роки тому

    Great video in general just bummer that you didn’t show how it looks like in the html file

  • @scottnorman2485
    @scottnorman2485 3 роки тому

    Love your videos, but this error keeps ocurring...
    ConnectionRefusedError
    [WinError 10061] No connection could be made because the target machine actively refused it

  • @alialavizadeh2775
    @alialavizadeh2775 4 роки тому

    that was great, tnx

  • @R3N3C3K
    @R3N3C3K 4 роки тому

    In comments under the video, many people mentioned that gmail is not forwarding sender's email address. Here is designed method how I have bipassed the issue and have got all dynamic content into the message: stackoverflow.com/questions/61518299/django-python-email-form-is-not-forwarding-senders-email-address-via-gmail-smtp

  • @investandcyclecheap4890
    @investandcyclecheap4890 3 роки тому

    Im getting a depreciated warning when running DebuggingServer . Is anyone else getting this? I havent been able to receive an email from my localhost yet...
    $ python -m smtpd -n -c DebuggingServer localhost:1025
    C:\Users\...\AppData\Local\Programs\Python\Python310\lib\smtpd.py:104: DeprecationWarning: The asyncore module is deprecated. The recommended replacement is asyncio
    import asyncore
    C:\Users\...\AppData\Local\Programs\Python\Python310\lib\smtpd.py:105: DeprecationWarning: The asynchat module is deprecated. The recommended replacement is asyncio
    import asynchat

    • @Codemycom
      @Codemycom  3 роки тому

      No clue...but you can always just try to do what it says and see what happens.

    • @alexandra.thegreat
      @alexandra.thegreat 2 роки тому

      I'm having the same issue. Have you managed to solve it? thanks ;-)

  • @alimomeni3535
    @alimomeni3535 3 роки тому

    gooood , nice

  • @rohit45kashyap
    @rohit45kashyap 4 роки тому +1

    When i m sending mail it always send
    From : setting.py file email address (EMAIL_HOST_USER)
    To: views.py recipient list
    Then what is mean of taking user email id
    The mail should go from User Email Id to recipent list. So what should i do?
    Please help

  • @diptabarman5756
    @diptabarman5756 4 роки тому

    it is not working after deploying

  • @anandsarank
    @anandsarank 3 роки тому

    Hi, Can anyone help me with this. I am getting - Exception Type: OSError at /contact.html
    Exception Value: Int or String expected

    • @bfarhan8
      @bfarhan8 3 роки тому

      Try Stackoverflow

  • @ИгорьКузнецов-т8р
    @ИгорьКузнецов-т8р 5 років тому

    Hi! I know that with django it's possible to send several email's at once from site. Can you explaine ho to do it? or maybe even make special video?!

    • @Codemycom
      @Codemycom  5 років тому +1

      I'm not going to do a video on that because people will just use it to spam. But you can read the Django Docs yourself: docs.djangoproject.com/en/3.0/topics/email/#send-mass-mail

  • @LAEC91
    @LAEC91 4 роки тому

    Sad but true. Not many people have 2FA turned on.

  • @TexasGunDude
    @TexasGunDude 5 років тому

    Thanks!

  • @AnilThapa-jx1fc
    @AnilThapa-jx1fc 4 роки тому

    Hello Sir All This Worked Perfectly But only problem i didnt recieved mail

  • @fustigate8933
    @fustigate8933 3 роки тому

    the thumbnail...your right hand...

  • @dropdeaddavi
    @dropdeaddavi 2 роки тому

    As of May 2022 Gmail no longer supports less secure app access, leaving this comment here in case there's an updated way of doing this

  • @imtiyazahamedchowdhury2822
    @imtiyazahamedchowdhury2822 3 роки тому

    Please help ! i set same things in my local host its working but after upload its not working from hosting . no massage send from account . so what i have to change in setting when i upload project in real hosting ?

  • @yusufyahya955
    @yusufyahya955 3 роки тому

    raise SMTPServerDisconnected('please run connect() first')
    if you had this error you my be want install this :
    pip install django-smtp-ssl
    this one to istall library smtp and ssl protokol

    • @manpatel783
      @manpatel783 3 роки тому +1

      That's not a smpt actually it is smpts

    • @ravindrakumara.
      @ravindrakumara. 3 роки тому

      still had same error, afeter added pip install django-smtp-ssl

  • @samucancld
    @samucancld 2 роки тому

    i can't believe is that fucking easy

  • @ram_qr
    @ram_qr 7 місяців тому

    👍👍👍👍👍

  • @saxophone69
    @saxophone69 3 роки тому

    disappointing not to have been able to see this work

    • @Codemycom
      @Codemycom  3 роки тому

      you did see this work, and then you commented on it...?

  • @bourki-dev8014
    @bourki-dev8014 3 роки тому

    this dosnt work pff

    • @Codemycom
      @Codemycom  3 роки тому

      It doesn't work if you mess it up

  • @dailypythontests
    @dailypythontests 2 роки тому

    great tutorial John, but I didn't see you utilize this: EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' I think it's really important

    • @Codemycom
      @Codemycom  2 роки тому

      why would you think that?