2013-08-26 10:47:50 +00:00
|
|
|
|
|
|
|
def on_login(self):
|
|
|
|
from webnotes.utils import validate_email_add
|
|
|
|
import conf
|
|
|
|
if hasattr(conf, "demo_notify_url"):
|
|
|
|
if webnotes.form_dict.lead_email and validate_email_add(webnotes.form_dict.lead_email):
|
|
|
|
import requests
|
|
|
|
response = requests.post(conf.demo_notify_url, data={
|
2013-09-09 06:47:45 +00:00
|
|
|
"cmd":"selling.utils.contact.send_message",
|
2013-08-26 10:47:50 +00:00
|
|
|
"subject":"Logged into Demo",
|
|
|
|
"sender": webnotes.form_dict.lead_email,
|
|
|
|
"message": "via demo.erpnext.com"
|
|
|
|
})
|