Flask Blog: Part 4 (Contact form & E-Mail)

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2024

ความคิดเห็น • 45

  • @ibrahim_essam
    @ibrahim_essam 3 ปีที่แล้ว +2

    Good job 👍👍 ,
    Nice Tutorial
    How to put image in main blog post by using flask , how to put it in admin panel .
    Thank you

  • @lassouedkhaoula5340
    @lassouedkhaoula5340 2 ปีที่แล้ว +2

    Great tutorial but i can't find the code source it's not found at github

  • @hirukamunasinghe9266
    @hirukamunasinghe9266 2 ปีที่แล้ว

    Heyy! Why am I getting a SMTPServerDisconnected error? You have any idea to fix that issue?

  • @franzbiberkopf9179
    @franzbiberkopf9179 3 ปีที่แล้ว +1

    Thank you very much, very good tutorial! Could you share the link to the code?

    • @devguyahnaf
      @devguyahnaf  3 ปีที่แล้ว +2

      It's in the video description

  • @daksheshsharma1747
    @daksheshsharma1747 4 ปีที่แล้ว +2

    Great Tutorial Man!
    Although when I'm sending the mail, I'm getting a Connection Refused Error, any idea how I can sort it ?

    • @devguyahnaf
      @devguyahnaf  4 ปีที่แล้ว +1

      Can you show me the full error log from the console?

    • @daksheshsharma1747
      @daksheshsharma1747 4 ปีที่แล้ว +1

      @@devguyahnaf That problem got resolved, it was a syntax error, but now I'm facing an AssertionError: This message does not specify a sender and a default sender has not been configured.

    • @devguyahnaf
      @devguyahnaf  4 ปีที่แล้ว +1

      @@daksheshsharma1747 the sender would be your email that you used for the smtp

    • @daksheshsharma1747
      @daksheshsharma1747 4 ปีที่แล้ว +1

      @@devguyahnaf I'm not getting it exactly, I have used the code that you referred in your GitHub repository, only the recipient name has been changed, do I have to add anything else ?
      I'm using a different template, is that the problem maybe ?

    • @devguyahnaf
      @devguyahnaf  4 ปีที่แล้ว +1

      @@daksheshsharma1747 I do not know about that. I can help you more in chat instead of comments. You can contact me on Discord. My username: Ahnaf#4346

  • @hasnutzamil2000
    @hasnutzamil2000 4 ปีที่แล้ว +1

    A very good video. I have learned many new things. Expecting more.

    • @devguyahnaf
      @devguyahnaf  4 ปีที่แล้ว

      😁 Thanks a lot 😎

  • @cameroonetranslate214
    @cameroonetranslate214 3 ปีที่แล้ว

    hey, google mail wont accept outlook connection so i used yahoo mail which worked, but when i try to send a mail i get this "smtplib.SMTPServerDisconnected: Connection unexpectedly closed"
    this is the configuration i used
    app.config['MAIL_SERVER'] = "smtp.mail.yahoo.com"
    app.config['MAIL_PORT'] = 587
    app.config['MAIL_USE_TLS'] = True
    app.config['MAIL_USE_SSL'] = False
    app.config['MAIL_USERNAME'] = mail_username
    app.config['MAIL_PASSWORD'] = mail_password
    mail = Mail(app)

    • @devguyahnaf
      @devguyahnaf  3 ปีที่แล้ว +1

      it's a problem on Yahoo's side. Worked for me when I used GMail. But Gmail sometimes gives issues so I use Outlook

  • @wendelmazurek5756
    @wendelmazurek5756 2 ปีที่แล้ว

    I'm getting the following error: "TypeError: _MailMixin.send() missing 1 required positional argument: 'message'"

    • @wendelmazurek5756
      @wendelmazurek5756 2 ปีที่แล้ว

      This is my Message Code: msg = Message(subject=f"Mail from: {cu_last_name},{cu_first_name}", body=f"E-Mail: {cu_email}
      Phone: {cu_phone}

      Subject: {cu_subject}
      Message: {cu_message}", sender=mail_username, recipients=['blanked-out for this post])
      No other errors with the form fields...

    • @wendelmazurek5756
      @wendelmazurek5756 2 ปีที่แล้ว

      Thank-you...its a great video

  • @LASCMusic
    @LASCMusic 3 ปีที่แล้ว

    Great! What is your theme of VS? Its pretty cool

    • @devguyahnaf
      @devguyahnaf  3 ปีที่แล้ว

      Thanks!
      I used Aurora X in the video: marketplace.visualstudio.com/items?itemName=marqu3s.aurora-x

  • @moshfekashithi3427
    @moshfekashithi3427 4 ปีที่แล้ว

    Hey I'm getting a nintendo switch and 4 games

    • @devguyahnaf
      @devguyahnaf  4 ปีที่แล้ว

      Nintendo switch 🤢. But if that's what you want then it's good. (Maybe) Im getting a graphics card after exam. After that I can make better videos

  • @t__t5438
    @t__t5438 3 ปีที่แล้ว

    Hey man, dont know if u can help me out but when i send the form it gives me an internal server error ?

    • @t__t5438
      @t__t5438 3 ปีที่แล้ว

      Do u know any reason why it keeps saying that

    • @devguyahnaf
      @devguyahnaf  3 ปีที่แล้ว

      @@t__t5438 what does it show in the console?

    • @t__t5438
      @t__t5438 3 ปีที่แล้ว

      @@devguyahnaf nvm fixed it

  • @nojoreduniya
    @nojoreduniya 3 ปีที่แล้ว

    Did you get the domain for ur website for free?

    • @devguyahnaf
      @devguyahnaf  3 ปีที่แล้ว

      What domain are you talking about? If you are talking about my domain ahnafzamil.com, I had to pay for it

    • @nojoreduniya
      @nojoreduniya 3 ปีที่แล้ว

      @@devguyahnaf I thought you got it by coding for free 😁😁

  • @prachitigholap7236
    @prachitigholap7236 3 ปีที่แล้ว

    I'm getting error, It says : cannot import name 'mail_username' from 'config'

    • @devguyahnaf
      @devguyahnaf  3 ปีที่แล้ว

      Do you have a config.py file? And does that have a variable called mail_username?

    • @prachitigholap7236
      @prachitigholap7236 3 ปีที่แล้ว

      @@devguyahnaf yes, I did same as you, error occurs while importing it

    • @devguyahnaf
      @devguyahnaf  3 ปีที่แล้ว

      @@prachitigholap7236 Check out the code on my GitHub. Link in description

    • @prachitigholap7236
      @prachitigholap7236 3 ปีที่แล้ว

      @@devguyahnaf thank you

  • @rinsyarifuddin8696
    @rinsyarifuddin8696 3 ปีที่แล้ว

    I get this when i click the send button " it seems that my mail server is not responding " please help me 🙏🙏

    • @devguyahnaf
      @devguyahnaf  3 ปีที่แล้ว

      Did you set up the Outlook SMTP?

    • @rinsyarifuddin8696
      @rinsyarifuddin8696 3 ปีที่แล้ว

      @@devguyahnaf i didn't set anything, i just to click send button

    • @devguyahnaf
      @devguyahnaf  3 ปีที่แล้ว

      @@rinsyarifuddin8696 You need to set your SMTP details

    • @rinsyarifuddin8696
      @rinsyarifuddin8696 3 ปีที่แล้ว

      @@devguyahnaf how to set SMTP??

    • @devguyahnaf
      @devguyahnaf  3 ปีที่แล้ว

      @@rinsyarifuddin8696 I showed that in the video. Watch it carefully

  • @mdmostafizurrahaman2255
    @mdmostafizurrahaman2255 4 ปีที่แล้ว

    WoW!