Answer the question
In order to leave comments, you need to log in
Image to email body PYTHON on Linux?
you need to embed a picture in the body of the letter (namely, in the letter itself, and not as an attachment to the letter) in python. I use Linux (Ubuntu)
Plus, everything needs to align the text and this picture in the center of my letter.
Also, add a hyperlink to another picture so that the picture is clickable.
I hope I expressed everything as detailed and intelligibly as possible, I am very, very weak in coding, but I am trying to become better) I will
attach part of the code:
# Optional.
"subject_header": bytes("Subject: КотБегемотэуэуэуэ\r\n", 'utf-8'), # Subject: hellso\r\n
"to_header": b"", # To: <[email protected]>\r\n
"body": bytes("<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<img src='/home/mkljuhjgh67888/kilujh111/lk787y.png'>
</body>
</html>\r\n", 'utf-8'), # Test Body.
# Optional. "raw_email": b"", }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question