2
Galera I set up an email using html and css. The email arrives perfect in several e-mail, but in G-mail the email arrives without css, ie only html.
Does anyone know how to solve the problem?
Follow my e-mail code:
$email->Body = "
<html>
<head>
<style type='text/css'>
body {
background-color: #F1F4F9;
}
table {
width: 600px;
border-collapse: collapse;
margin-left:auto;
margin-right:auto;
}
.topo {
text-align:center;
background-color: #1E90FF;
height: 200px;
}
.meio {
padding: 20px;
background-color: #ffffff;
height: 300px;
vertical-align: text-top;
}
.fim {
text-align:center;
font-weight: bold;
background-color: #1E90FF;
height: 50px;
color: #ffffff;
}
.fim a{
color: #ffffff;
}
.titulo {
text-align:center;
font-size: 25px;
font-weight: bold;
}
</style>
</head>
<body>
<table>
<tr>
<td class='topo'>
MEU LOG AQUI
</td>
</tr>
<tr>
<td class='meio'>
<p class='titulo'>TITULO</p>
TEXTO DO E-MAIL
</td>
</tr>
<tr>
<td class='fim'>
Estamos a disposição
</td>
</tr>
</table>
</body>
</html>
";
I’m doing something wrong?
perfect friend, it worked 100%. It takes away one more doubt, I’m trying to send a logo in svg, and it’s not working in g-mail. Which is the correct way?
– Hugo Borges
@Hugoborges I never included SVG in the submitted template. Do the following, open a new question with that question, I really can’t answer because I’ve never tried.
– Filipe Moraes
I decided to exchange it for png. Vlw help for everything :)
– Hugo Borges