Python Forum

Full Version: Need help to copy content of the text file into the body of the email as html
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Guys
I have 2 text files created by another scripting program....I want to copy those the content of the text file into the body of the html file as email.

For example...
1.Failed_Devices.txt have
192.168.145.2
server1
serverhost2
blah

2. Failed_URL.txt have
server.com:443
hostname3.ca
blah blah.com


I want to send the content of those 2 text file in an email using python as follow


Sender : [email protected]
REciever : [email protected]
Subjet : failed report

In the body of the email I want like this


Failed devices
192.168.145.2
server1
serverhost2
blah

URL not reacheable links
server.com:443
hostname3.ca
blah blah.com