welcome, I am trying to send email with attachment (.png or .pdf) no success so far. regular emails are sent though. Is there a way to send attachments using Wix? thanks!
This is the text that appears in email body: [object Object]
Here is part of the code:
function sendFormData(attachment) { var attachments = [{ 'filename': 'filename.png', 'content': attachment, 'contentType': 'application/png' }] var counter = 0, attach = []; attach.push(attachments); const subject = `test subject`; const body = attach; const recipient = 'example@gmail.com'; sendEmailWithRecipient(subject, body, recipient) .then(response => console.log(response)); sendEmail(subject, body) .then(response => console.log(response)); }
Yes, this logic is in html component
I think only way would be to host file using external sever and attach a link.
Wix sites do not support a "standard" file system for the site. Where are the files that you wish to attach?