File size: 603 Bytes
08eaca3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
// email.service.ts
import { Injectable } from '@angular/core';
import emailjs, { EmailJSResponseStatus } from 'emailjs-com';
@Injectable({
providedIn: 'root'
})
export class EmailService {
constructor() { }
sendEmail(templateParams: any): Promise<EmailJSResponseStatus> {
const serviceId = 'service_22wzxai'; // Replace with your EmailJS service ID
const templateId = 'template_ok25x9n'; // Replace with your EmailJS template ID
const userId = 'nQusk6dPtAR0vTe3I'; // Replace with your EmailJS user ID
return emailjs.send(serviceId, templateId, templateParams, userId);
}
}
|