yagmail send messages in HTML format picture does not display solutions to problems

I am using the mail yagmail module sends graphic format, mailing graphic format, you need to send in HTML format file, the following is my definition of HTML file

<html>
<body>
<img src="./out1.jpg" />
</body>
</html>

After such a message can not display the picture file is sent, the reason is because of this connection is a local connection, non outside the network can access the connection, due to the not yet deployed to the server, so I used the "map bed" give this image to generate a link, after into the HTML, as follows:

<html>
<body>
<img src="https://s2.ax1x.com/2019/11/06/MClR7F.md.jpg" alt="MClR7F.jpg" border="0" />
</body>
</html>

 

At times we run the program, the message content can be displayed on a picture, as shown below:

 

 

Guess you like

Origin www.cnblogs.com/xiaokuangnvhai/p/11803771.html