Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sending html file in email
#4
Here's what you do currently:
part1 = MIMEText(text, 'plain')
part2 = MIMEText(html, 'html')

msg.attach(part1)
msg.attach(part2)
Don't attach part1, so the only content on the email is the html content.
Reply


Messages In This Thread
sending html file in email - by santoshi - Apr-03-2019, 10:32 AM
RE: sending html file in email - by nilamo - Apr-03-2019, 08:23 PM
RE: sending html file in email - by santoshi - Apr-05-2019, 06:04 AM
RE: sending html file in email - by nilamo - Apr-05-2019, 03:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need to replace a string with a file (HTML file) tester_V 1 761 Aug-30-2023, 03:42 AM
Last Post: Larz60+
  Tkinterweb (Browser Module) Appending/Adding Additional HTML to a HTML Table Row AaronCatolico1 0 923 Dec-25-2022, 06:28 PM
Last Post: AaronCatolico1
  is it possible to copy image from email and place into excel file? cubangt 3 1,265 Nov-30-2022, 05:11 PM
Last Post: snippsat
  Sending Whatsapp Message in the text file ebincharles869 9 3,514 Jun-21-2022, 04:26 PM
Last Post: snippsat
  HTML file crashes program mikefirth 12 3,807 Dec-31-2021, 03:57 AM
Last Post: Pedroski55
  reading html and edit chekcbox to html jacklee26 5 3,072 Jul-01-2021, 10:31 AM
Last Post: snippsat
  code for CSV file to html file without pandas jony057 1 2,957 Apr-24-2021, 09:41 PM
Last Post: snippsat
  how to automate sending bulk emails from an excel file or a calc-file apollo 0 2,750 Dec-10-2020, 08:43 PM
Last Post: apollo
  Sending Out Email via Python JoeDainton123 1 4,763 Aug-31-2020, 12:54 AM
Last Post: nilamo
  Including a Variable In the HTML Tags When Sending An Email JoeDainton123 0 1,877 Aug-08-2020, 03:11 AM
Last Post: JoeDainton123

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020