I’m new in erpnext community
I want to send email of people have some condition;
I change the hooks.py file:
scheduler_events = {
“all”: [
“managestaff.tasks.all”
],
}
then created the file apps/my_app/my_app/tasks.py and the write the code :
i executed the commands:
bench builed
bench migrate
bench start
but no sense for the file tasks.py
where is the problem???
Hey @Mariam_A_Ahmed ,
If you only want to send email without any scheduling timing you can use below ,
You can get the sorted emails(some condition) inside that recipient list
`
def send_mail_custom(recipient,content):
print “Suresh checking******************** send_mail_custom function”,recipient
def send_mail_custom(recipient,content):
frappe.sendmail(recipients=[recipient],
sender="erptest@meritsystems.com",
subject="Purchase Order Alert", content=content)
`
can we run this without hook.py
because i am using frappe cloud hosted erpnext where i am unable to write hook.py
can you help me?