Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 30098

Can you please help me in python email library

$
0
0

I added piece of code in my program.Can you please help me why it is not working. Below is the sample code:

wrapper = MIMEMultipart('mixed')

text1 = "this is a sample text"

text2 = "this is a sample msg"

part1 = MIMEText(text1, "plain")

part2 = MIMEText(text2, "plain")

wrapper.attach(part1)

wrapper.attach(part2)

output: Part1 value is coming in msg body but part2 value is coming as attachment in mail.why part2 value is not coming in msg body?? Any idea.


Viewing all articles
Browse latest Browse all 30098

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>