Forgot-password no email sent with sendmail

System Information
  • Strapi Version: 4.13.7
  • Operating System: Ubuntu 20.04.6 LTS
  • Database: mySQL 8
  • Node Version: 18.18.0
  • NPM Version: 9.8.1
  • Yarn Version: none

I configured email plugin and tested successfully the mail send process.
Invoking strapi api https://mydomain/strapi/api/auth/forgot-password/ the response is:

{
    "ok": true
}

Non mail sent, no mail received.

On the same server I’m using successfully sendmail command.
Can someone help me?

Thank you in advance


I am facing the same error with sendgrid, but sendgrid is configured successfully. When I try to send a test email with SendGrid provider in admin/settings/email, it worked

Thank you for your answer.

My test mail, from admin/settings/email is also ok, with sendmail.
All parameters seem to be correct but no mail is sent or received.
I don’t know where I can check to find the problem.

UPDATE

I installed @strapi/provider-email-nodemailer plugin (nodemailer for strapi v4).

Sending emails to gmail, aruba, tin addresses I get a Strapi Error about a no-replay sender address

Strapi error log

Error: Mail command failed: 550 5.1.0 <no-reply@mydomain> lZwHqEkCXZKt6lZwHqcENf - Mittente non consentito / Sender not allowed ( mail from )
    at SMTPConnection._formatError (.../server/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)
    at SMTPConnection._actionMAIL (.../server/node_modules/nodemailer/lib/smtp-connection/index.js:1578:34)
    at SMTPConnection.<anonymous> (.../server/node_modules/nodemailer/lib/smtp-connection/index.js:1047:18)
    at SMTPConnection._processResponse (.../server/node_modules/nodemailer/lib/smtp-connection/index.js:953:20)
    at SMTPConnection._onData (.../server/node_modules/nodemailer/lib/smtp-connection/index.js:755:14)
    at SMTPConnection._onSocketData (.../server/node_modules/nodemailer/lib/smtp-connection/index.js:193:44)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)

My plugin config:

email: {
        config: {
            provider: env('EMAIL_PROVIDER'),
            providerOptions: {
                host: env('EMAIL_SMTP_HOST'),
                port: env('EMAIL_SMTP_PORT'),
                auth: {
                  user: env('EMAIL_SMTP_USER'),
                  pass: env('EMAIL_SMTP_PASS'),
                },
              },
            settings: {
                defaultFrom: env('EMAIL_ADDRESS_FROM'),
                defaultReplyTo: env('EMAIL_ADDRESS_REPLY'),
            },
        }
    },

My .env (email section):

# Email SMTP
EMAIL_PROVIDER=nodemailer
EMAIL_SMTP_HOST=smtps server
EMAIL_SMTP_PORT=port
EMAIL_SMTP_USER=mysmtpuser
EMAIL_SMTP_PASS=mysmtppwd
EMAIL_ADDRESS_FROM=myemail
EMAIL_ADDRESS_REPLY=myemail