blob: a1113ae6099f2f086668111b415c772a48e3e3e0 [file] [log] [blame]
Rushabh Mehtaacd33672013-08-26 16:17:50 +05301
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={
Rushabh Mehtac59c4e02013-09-09 12:17:45 +05309 "cmd":"selling.utils.contact.send_message",
Rushabh Mehtaacd33672013-08-26 16:17:50 +053010 "subject":"Logged into Demo",
11 "sender": webnotes.form_dict.lead_email,
12 "message": "via demo.erpnext.com"
13 })