Custom services not found

Hi, i create one service for send emails.

import { factories } from ‘@strapi/strapi’;
const nodemailer = require(‘nodemailer’); // Requires nodemailer to be installed (npm install nodemailer)

// Create reusable transporter object using SMTP transport.
const userEmail = process.env.SMTP_EMAIL
const userPass = process.env.SMTP_PASS
const smtpHost = process.env.SMTP_HOST
const smtpPort = process.env.SMTP_PORT

// Create reusable transporter object using SMTP transport.
let transporter = nodemailer.createTransport({

host: smtpHost,
port: smtpPort,
secure: true, // upgrade later with STARTTLS
auth: {
    user: userEmail,
    pass: userPass,


export default factories.createCoreService(‘api::emailNotification.nodeMailer’, ({ strapi }) => ({
sendNewsletter(from, to, subject, text) {
// Setup e-mail data.
const options = {

// Return a promise of the function that sends the email.
return transporter.sendMail(options);


In my lifecycles when call this service i have this error:

My code for this actions is:

strapi.service(‘api::email-notificacion.node-mailer’).sendNewsletter(‘’, ‘’,‘test’, ‘test strapi’)

where is the error?..