fix: convert to/cc/bcc array to comma separated emails

This commit is contained in:
Shariq Ansari 2023-12-26 19:23:08 +05:30
parent 127b354ba7
commit 7644958ec7

View File

@ -105,11 +105,14 @@ const onNewEmailChange = (value) => {
} }
async function sendMail() { async function sendMail() {
let recipients = newEmailEditor.value.toEmails
let cc = newEmailEditor.value.ccEmails
let bcc = newEmailEditor.value.bccEmails
await call('frappe.core.doctype.communication.email.make', { await call('frappe.core.doctype.communication.email.make', {
recipients: doc.value.data.email, recipients: recipients.join(','),
attachments: attachments.value.map((x) => x.name), attachments: attachments.value.map((x) => x.name),
cc: '', cc: cc.join(','),
bcc: '', bcc: bcc.join(','),
subject: 'Email from Agent', subject: 'Email from Agent',
content: newEmail.value, content: newEmail.value,
doctype: props.doctype, doctype: props.doctype,