Email Documents

Hi,
I would like to email for eg - “supplier quotation” from an external document, without opening supplier quotation. How would I go about this?

Can you explain in detail? What did you try?

I haven’t tried anything yet.
I want to select few items on a custom Doctype. Create a supplier quotation with those items and then send the same as an email, without moving to the supplier quotation form.

I can create the doc using get_doc / new_doc and fill the details, but how would I pull the email dialog screen so as to prepare an email and send the created doc?

Ok,
I think I can use a dialog screen to collect info and use the function below?

def send(recipients=None, sender=None, subject=None, message=None, reference_doctype=None,	reference_name=None, unsubscribe_method=None, unsubscribe_params=None, unsubscribe_message=None, attachments=None, reply_to=None, cc=(), message_id=None, send_after=None )

Could someone guide me to the code where from the form view emails are created? looking for the client side code.

try this: frappe/__init__.py at develop · frappe/frappe · GitHub

@rmehta
ah I think I have an idea on what to do, but to be clear could you tell me where the control goes from email_doc()

this.page.add_menu_item(__("Email"), function() {
me.frm.email_doc();}, true);
}

Why don’t you trace the function?