Sending new Job Opening mails to existing Applicants

Hello everyone,

I want to customize one thing that is sending mails to existing Job Applicants about new openings, is there any way we can achieve this anyhow?

I have seen documentation for email campaigns and all, but I didn’t get anything.

My stack:
ERPNext: v15.20.6 (version-15)

Frappe Framework: v15.23.0 (version-15)

Frappe HR: v15.19.0 (version-15)

You have to make a that using server-side using doc_event and statically set the existing Job Applicants then you can use the notification doctype.

okay sounds good. but how can we get applicants’ email details from another doctype (job applicant)

multiple or single applicants? Where to set and in which field?

possible using server script logic.

Multiple existing applicants, when a recruiter opens a new job opening then opportunity mails should go to every existing job applicants (it can be more than one)

yes possible, but you have to develop the server script for that.

can you please help me understand like in which DocType I have to develop server script (Job Opening or Job Applicant). If I have to do on Job Opening, then how can we fetch all the applicant’s email id from Job Applicant DocType.

No need to fetch job application for that. Directly you can write the logic in the server script itself. Only you have to use on submit doc_event.

Even if you want to fetch job application in job opening, you have to use client script or server script. And you have to take data or text field there.

1 Like

Oh, Ok. Thank you,

Let me try this.

Hi @ncp,

thank you for the help I have used this code, and it worked for me.

a = frappe.db.get_list('Job Applicant', as_list=True)
    
candiate_mail_list = [email[0] for email in a]

frappe.sendmail(recipients = candiate_mail_list, sender='sender@mail.com', subject='Subject', message=template)