Rushabh Mehta | acd3367 | 2013-08-26 16:17:50 +0530 | [diff] [blame] | 1 | |
| 2 | def on_login(self): |
| 3 | from webnotes.utils import validate_email_add |
| 4 | import conf |
| 5 | if hasattr(conf, "demo_notify_url"): |
| 6 | if webnotes.form_dict.lead_email and validate_email_add(webnotes.form_dict.lead_email): |
| 7 | import requests |
| 8 | response = requests.post(conf.demo_notify_url, data={ |
| 9 | "cmd":"website.helpers.contact.send_message", |
| 10 | "subject":"Logged into Demo", |
| 11 | "sender": webnotes.form_dict.lead_email, |
| 12 | "message": "via demo.erpnext.com" |
| 13 | }) |