I have written a small code which collect 'text', 'email', and 'subject' form the spreadsheet and send gmail to the recipient. Google Script is working fine, however the width of the automated gmail is fixed. So when the length of 'text' changes gmail width doesn't change which leads to changes in text placement and that looks bit weird.
My Code example:-
function temp2() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var dataSheet = ss.getSheetByName('Sheet1');
var templateSheet = ss.getSheetByName('Sheet2');
var emailTemplate2 = templateSheet.getRange("G1").getValue();
var rec = templateSheet.getRange("C1").getValue();
var sub = templateSheet.getRange("D1").getValue();
// Logger.log(rec);
MailApp.sendEmail(rec, sub, emailTemplate2);
}
First Image of my truncated email:-

Second Image of my truncated email:-

In this mail 'May/December', '171/26131', and 'April/November' are the dynamic words. Due to which my second line of the mail (as you can see in this image) sometime ends at 'following' or sometimes at 'closed' (depending on the length of these three dynamic entries).
Ideally in my gmail width should be dynamic and it should end with the 'Period(.)' after the Month name in this case it is April/November.
I would like to check that Do we have any sub-option in GAS through which we can make the 'width of the gmail dynamic'? I gone through MailApp.sendEmail Options in documentation but couldn't find more details.
Any suggestion in this regard will be very helpful.
Regards,
Alok