How to send email using react scheduler component when appointment is booked
Hi Parthasarathy,
Greetings from Syncfusion support.
Currently, we have no sample code to send SMS and WhatsApp now from the scheduler. You can achieve it in the following ways.
We didn’t recommend any third-party software. You can proceed based on your requirement.
For reference, we have prepared a sample that sends a mail when creating an appointment in the Schedule with help of EmailJS and actionComplete event of the Schedule as shown in the below code snippet.
[App.js]
|
import emailjs from 'emailjs-com'; import { ScheduleComponent, Day, Week, WorkWeek, Month, Agenda, Inject, ViewsDirective, ViewDirective } from '@syncfusion/ej2-react-schedule';
function App() {
const onActionComplete = function (args) { if (args.requestType === 'eventCreated') { var data = args.data[0]; data['user_name'] = 'YOUR NAME'; // Sending mail using EmailJS send method emailjs.send('YOUR_SERVICE_ID', 'YOUR_TEMPLATE_ID', data, 'YOUR_USER_ID') .then(function (response) { console.log('SUCCESS!', response.status, response.text); }, function (error) { console.log('FAILED...', error); }); } }
return ( <div className="App"> <ScheduleComponent actionComplete={onActionComplete}> </ScheduleComponent> </div> ); }
export default App; |
Steps to send email using EmailJS:
Kindly try the shared sample and let us know if you need any further assistance.
Regards,
Ravikumar Venkatesan
Why reminder facility is not there when we create event?
Hi Parthasarathy,
When we create appointment, the actionComplete
event will be invoked with all necessary information of newly created
appointment, we can set reminder in application end based on the actionComplete
event data.
let us know if you need any further assistance.
Regards,
Mugilraj G