seperate function for sending confirmation
diff --git a/erpnext/crm/doctype/appointment/appointment.py b/erpnext/crm/doctype/appointment/appointment.py
index fa4b7ec..9e051f6 100644
--- a/erpnext/crm/doctype/appointment/appointment.py
+++ b/erpnext/crm/doctype/appointment/appointment.py
@@ -42,20 +42,21 @@
# Set status to unverified
self.status = 'Unverified'
# Send email to confirm
- verify_url = self._get_verify_url()
- template = 'confirm_appointment'
- args = {
- "link":verify_url,
- "site_url":frappe.utils.get_url(),
- "full_name":self.customer_name,
- }
- frappe.sendmail(recipients=[self.customer_email],
- template=template,
- args=args,
- subject=_('Appointment Confirmation'))
- frappe.msgprint(
- 'Please check your email to confirm the appointment')
+ def send_confirmation_email()
+ verify_url = self._get_verify_url()
+ template = 'confirm_appointment'
+ args = {
+ "link":verify_url,
+ "site_url":frappe.utils.get_url(),
+ "full_name":self.customer_name,
+ }
+ frappe.sendmail(recipients=[self.customer_email],
+ template=template,
+ args=args,
+ subject=_('Appointment Confirmation'))
+ frappe.msgprint(
+ 'Please check your email to confirm the appointment')
def on_change(self):
# Sync Calendar