Improved creating html emails.

This commit is contained in:
Martin Edenhofer 2015-01-09 00:01:41 +01:00
parent 192f4e27df
commit 6bb1522e29
2 changed files with 27 additions and 24 deletions

View file

@ -112,13 +112,39 @@ module Channel::EmailBuild
def self.html_complete_check(html)
return html if html =~ /<html>/i
css = 'font-family:Geneva,Helvetica,Arial,sans-serif; font-size: 12px;'
css = "font-family:'Helvetica Neue', Helvetica, Arial, Geneva, sans-serif; font-size: 12px;"
html = <<HERE
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
body {
width:90% !important;
-webkit-text-size-adjust:90%;
-ms-text-size-adjust:90%;
#{css};
}
img {
outline:none; text-decoration:none; -ms-interpolation-mode: bicubic;
}
a img {
border:none;
}
table td {
border-collapse: collapse;
}
table {
border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;
}
p {
margin: 0;
}
p, table, div, td {
max-width: 600px;
}
</style>
<head>
<body style="#{css}">#{html}</body>
</html>

View file

@ -331,29 +331,6 @@ Changes:<br>
def template_header(user)
'
<style type="text/css">
p, table, div, td {
max-width: 600px;
}
body{
width:90% !important;
-webkit-text-size-adjust:90%;
-ms-text-size-adjust:90%;
font-family: \'Helvetica Neue\', Helvetica, Arial, sans-serif;
font-size: 12px;
}
img {
outline:none; text-decoration:none; -ms-interpolation-mode: bicubic;
}
a img {
border:none;
}
table td {
border-collapse: collapse;
}
table {
border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;
}
.header {
color: #aaaaaa;
border-bottom-style:solid;