mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Allow Gmail node to send messages formatted as HTML (#1285)
* Allowing Gmail node to send messages formatted as HTML * Improving message field description * Fixing lint issues * Adding missing trailing comma * ⚡ Small improvements to GMail-Node Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -133,20 +133,23 @@ export async function encodeEmail(email: IEmail) {
|
||||
|
||||
const mailOptions = {
|
||||
to: email.to,
|
||||
cc : email.cc,
|
||||
cc: email.cc,
|
||||
bcc: email.bcc,
|
||||
replyTo: email.inReplyTo,
|
||||
references: email.reference,
|
||||
subject: email.subject,
|
||||
text: email.body,
|
||||
} as IDataObject;
|
||||
if (email.htmlBody) {
|
||||
mailOptions.html = email.htmlBody;
|
||||
}
|
||||
|
||||
if (email.attachments !== undefined && Array.isArray(email.attachments) && email.attachments.length > 0) {
|
||||
const attachments = email.attachments.map((attachment) => ({
|
||||
filename: attachment.name,
|
||||
content: attachment.content,
|
||||
contentType: attachment.type,
|
||||
encoding : 'base64',
|
||||
encoding: 'base64',
|
||||
}));
|
||||
|
||||
mailOptions.attachments = attachments;
|
||||
|
||||
Reference in New Issue
Block a user