Callback when mail has been sent

Hello there,

I am using this code to open a mail dialog for the current doc:

new frappe.views.CommunicationComposer({
	doc: frm.doc,
	frm: frm,
	subject: __( + ': ' + frm.docname,
	recipients: || frm.doc.email_id || frm.doc.contact_email,
	attach_document_print: true,
	message: message,
	real_name: frm.doc.real_name || frm.doc.contact_display || frm.doc.contact_name

Now the user has the choice if he sends the mail or not, of course. But i want to use callbacks. So, if the user has sent the mail, I want to change my doctype to set a value of a field to “Mail sent” or simply check a checkbox.

If he didn’t, I would leave it empty.

How can I achieve this kind of callback?

Thank you.

Not out of the box! You can implement it and send PR :slightly_smiling_face:

I will try, thank you :slight_smile:

It wasn’t so hard, I hope quality and functionality is sufficient:


@ci2016 Awesome !!

1 Like