try not to judge my script so far because its very messy but it works….somehow, the issue i have at the moment is i have the image in the script, however i have no idea how to make it Line up to the left and have the Text to the right of the image with the top of the text of line 1 matching the height of the top of the image, any help is appreciated.
function myFunction() {
let sheet = SpreadsheetApp.getActiveSheet();
let data = sheet.getRange('A2:B').getDisplayValues();
data.filter(row => row.every(Boolean)).forEach(row => {
let [name, address] = row;
let subject = `Subject Text`;
let body = `Dear ${name}.<br><br>
I hope this email finds you well.<br><br>
I am writing to you in regards to XXX, "".<br><br>
.<br><br>
.<br><br>
Kind Regards,<br><br>
<b><span style='color: #C19B77;'>Title of Person<br>
<span style='color: #C19B77; font-size: 15px;'>Name of Person</span><br><br>
<b><span style='color: #C19B77;'>Mobile:</b>+44 12345678 Address<br>
<b><span style='color: #C19B77;'>Email:</b>[email protected] Adress line 2<br>
<img src="URL Example" alt="Image 1" style="width: 200px; height: 180px;">`;
MailApp.sendEmail({to: address, subject, htmlBody: body, cc:''});
});
}
I’ve tried using something called “float” but that did nothing and I’m kind of out of my element at this point.
TiredAndHungry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.