I want to write a simple python script that send a EML file exported from Outlook though given smtp server as email to a given list of emails. I know how to send a simple email but sending a EML file as email is not something i could do and could not find it on Google. Can anyone help me with that. The EML file is actually in HTML format with embedded images. Any alternate suggestion is also welcome.
Getting started Java with Linux OS
Invoke make from different directory with python script
How to convert large SVG file to tiled PNGs?
If the EML format is just HTML, this should work..
Communication between two application in the same local machine
The example shows how to construct a message with (html) attachments:.
Linux, timerfd accuracy
# Create the body of the message (a plain-text and an HTML version).
Can gcc generate different size object code?
text = "Hi!\nHow are you?\nHere is the link you wanted:\nhttp://www.python.org" html = """\ <html> <head></head> <body> <p>Hi!<br> How are you?<br> Here is the <a href="http://www.python.org">link</a> you wanted.
How to find floppy\ CD sector size in Linux?
</p> </body> </html> """ # Record the MIME types of both parts - text/plain and text/html.
Authentication Failed (error 530) with Embedded Apache FTP Server
part1 = MIMEText(text, 'plain') part2 = MIMEText(html, 'html') # Attach parts into message container.
# According to RFC 2046, the last part of a multipart message, in this case # the HTML message, is best and preferred.
msg.attach(part1) msg.attach(part2) #...