Hi there!
I am trying embed a plotly graph within an email. I can attached it as a html file, but not embed it within the email html body. I convert the graph to hmtl first. It sends the email with text but the graph does not render
div = plot(
fig,
output_type = 'div',
include_plotlyjs = False #I've also tried this as True
)
mail.HTMLBody = '''
<html>
<head>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<style>body{ margin:0 100; background:whitesmoke; }</style>
</head>
<body>
<h1>Monthly Report</h1>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
''' + div + '''
</body>
</html>'''
mail.Send() #I've tried gmail and outlook, same issue on both