Как применить фоновое изображение при отправке электронной почты, используя django - PullRequest
1 голос
/ 25 марта 2020

Надеюсь, заголовка достаточно, чтобы понять мою проблему. я просто хочу добавить в свой email_ html фоновое изображение.

это мой email_ html

{% load static %}
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url('https://myschoolapp.school.com/static/emailbackground.jpg');
background-repeat: repeat-y no-repeat;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="20">
<tr>
<td>
<p>Content on a pretty background image.</p>
</td>
</tr>
</table>
</body>
</html>

1 Ответ

1 голос
/ 25 марта 2020

Вы можете попробовать это

{% load static %}
<!DOCTYPE html>
<html>
<head>

</head>
<body>

<table role="presentation" width="800" height="750" style="background: url('https://myschoolapp.school.com/static/emailbackground.jpg') center / cover no-repeat #000000;" cellpadding="0" cellspacing="0" border="0" align="center" > 
<tr>
<td >
<p>Content on a pretty background image.</p>
</td>
</tr>
</table>



</body>
</html>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...