Bring up to date #1

Merged
boogah merged 2 commits from master into master 2025-03-13 19:56:49 +00:00
2 changed files with 37 additions and 45 deletions

View File

@ -5,42 +5,33 @@
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
<meta property="og:title" content="Bulk Emails">
<title>Bulk Email Summary</title>
<style>a{color:rgb(63,138,191) !important;text-decoration:none;}</style>
</head>
<body style="width: 100%;margin: 0;padding: 0;-webkit-font-smoothing: antialiased;text-align:center;" align="center">
<table border="0" cellspacing="0" cellpadding="0" style="max-width:500px;margin:auto;text-align:left">
<body>
<table border="0" cellspacing="1em" cellpadding="1em">
<tbody>
<tr>
<td><div style="height: 10px;"></div></td>
</tr>
<? for (var i = 0; i < data.length; i++) { ?>
<tr>
<td style="background-color: #fff; border:1px solid #d5dce0;border-radius: 10px;box-shadow: 0 2px 4px rgba(0,0,0,0.18);" bgcolor="#fff">
<div style="padding: 0 10px; margin: 0; display: block;">
<h4 style="font-family: Georgia, Times, sans; font-weight: normal; color: #666; font-size: 13px; margin: 0; padding-top: 12px;">
<?= data[i].from ?> wrote:
<td style='margin: 0 1em 0 0;'>
<h4 style="margin: 0; padding-top: 12px;font-weight:normal">
<a style="color:rgb(63,138,191) !important;text-decoration:none;"
href="mailto:<?= data[i].email ?>"><?= data[i].from ?></a>
</h4>
</div>
<p style="font-family: Georgia, Times, sans; color: #666; padding: 5px 10px 0;margin: 0; font-size: 14px;">
<strong><?= data[i].subject ?></strong>
</p>
<p style="font-family: Georgia, Times, sans; color: #999; padding: 0 10px 10px; margin: 0; font-size: 10px;">
<p style="margin: 0;">
at <?= Utilities.formatDate(data[i].date, Session.getScriptTimeZone(), "HH:mm 'on' MMM d") ?>
from <?= data[i].email ?>
<? if(data[i].uns) { ?>
| <a style="background-color: #eee; border: 1px solid #ccc; border-radius: 2px; padding:0 2px" bgcolor="#eee"
href="<?= data[i].uns ?>">unsubscribe</a>
</p>
<p style="margin: 0;">
<? if(data[i].uns) { ?>
<a style="display:inline-block;color:rgb(255,255,255); padding:0.25em; background:rgb(63,138,191); border-radius: 5px !important;text-decoration:none;"
href="<?= data[i].uns ?>">unsubscribe</a>
<? } ?>
</p>
</td>
<td>
<p style="margin: 0; padding: 0;">
<a style='font-size:1.5em !important; color:rgb(22,22,22) !important; text-decoration:none;' href="<?= data[i].permalink?>"><?= data[i].subject ?></a>
</p>
</td>
</tr>
<tr>
<td><div style="height: 15px;"></div></td>
</tr>
<? } ?>

View File

@ -47,6 +47,7 @@ function getEmails() {
for (var i = 0; i < threads.length; i++) {
if (threads[i].getLastMessageDate()>maxDate){
var d = {}
d.permalink = threads[i].getPermalink()
d.subject = threads[i].getFirstMessageSubject()
var from = threads[i].getMessages()[0].getFrom()
d.from = from.replace(/\"|<.*>/g,'')