Send Emails using Python | HTML Formatting | HTML Tables | Emails with Attachments | HTML Templates

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

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

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

    Mate, this was really good. Keep up the good work.

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

    Very nice explanation and worked for me. Thanks for uploading.

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

    It was a great explanation. Looking forward for more such content.

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

    Excellent job! Thank you for posting!

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

    i can't thank you enough!!!! liked!

  • @chicago9458
    @chicago9458 ปีที่แล้ว

    Clean clear

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

    Thank you brother

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

    fantastic

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

    I want to send mail from my office outlook. What will be the server? Please help. All email address will be official domain.

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

      You can ask your IT staff for the exchanger server. You can also try and find it in the outlook. This article list the steps on how to get your exchange server’s address:
      www.nucleustechnologies.com/blog/how-to-find-exchange-server-address/amp/

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

      @@BiInsightsInc thanks

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

      @@BiInsightsInc sir what is your LinkedIn profile name

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

      Hi @@hellofrombd1960 you can find me on LinkedIn here: www.linkedin.com/in/haq-nawaz/

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

    How can we conditional format the table cells? The argument provided by pretty_html_table doesn't seem to work

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

      Hi Almas, if you want to use conditional formatting then I'd suggest use a regular dataframe. Apply your conditional formatting and then call the to_html() function on to convert it to text. You should be able to send it in the email body.

  • @RijulJain-n8e
    @RijulJain-n8e ปีที่แล้ว

    Thanks

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

    Can you please show how to attach an HTML file for example with name data.html as an attachment in email?

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

      Hi Swapnil, thanks for stopping by. Here's how you would send an html file as an attachment.
      html = open("data.html")
      msg = MIMEText(html.read(), 'html')
      msg['From'] = from
      msg['To'] = to
      msg['Subject'] = "Weekly Sales Report"
      #
      message = msg.as_string()

  • @amrselim2167
    @amrselim2167 7 หลายเดือนก่อน

    how to do you deal with broken images after send your html style ?!!

    • @BiInsightsInc
      @BiInsightsInc  7 หลายเดือนก่อน

      Broken images can be due to incorrect path so check the image path and try again. Certain email client do not load images i.e. you need to download the images in outlook.

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

    Hi , how to send mails to multi recipients with html ?

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

      Hi David, you can pass in multiple recipients as a list when you send an email.
      # declare receiver emails variable
      receiver = ['emailone0@gmail.com', 'email2@gmail.com']

  • @AbhishekSingh-jy5ot
    @AbhishekSingh-jy5ot 2 ปีที่แล้ว

    output = pretty_html_table(data,"blue_light")
    'module' object is not callable
    .
    .
    message.attach(MIMEText(body_content,'html'))
    'DataFrame' object has no attribute 'encode'

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

      Hi Abhishek, you need to make sure you've "pretty-html-table" installed and you're importing in your script before calling it.

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

    it went great up to section4 - then you lost me, some more basic example with more context on the different methods used would have been more effective for me. Too bad.