Trying to send email from new radicle site, but get sender issues in logs

I have configured my smtp with realiases

mail.yml

mail_smtp_server: smtp.sendgrid.com:587
mail_hostname: example.com
mail_user: admin@example.com
mail_password: '{{ vault_mail_password }}' # Define this in group_vars/all/vault.yml

Revalias seems to be on the server

root@ubuntu-16gb-hil-1:~# cat /etc/ssmtp/revaliases
# Ansible managed

root:redacted@redacted:smtp.sendgrid.net:587
admin:redacted@redacted.com:smtp.sendgrid.net:587
web:redacted@redacted.com:smtp.sendgrid.net:587

The email that is set above is the verified sender in sendgrid and I get the following error in new relic

2025-01-31T18:27:03.875892+00:00 ubuntu-16gb-hil-1 sSMTP[62894]: 550 The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements

Do you know where I can find what email it is being sent for the from so I can debug, just not sure where to look for that?

Emails send with

echo "Test email" | ssmtp -v email@example.com

I get

Could not instantiate mail function.

In email logging in wordpress

And

sSMTP[83638]: 550 The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit Sender Identity | SendGrid Docs | Twilio to see the Sender Identity requirements

In the logs

root@ubuntu-16gb-hil-1:~# echo "Test email" | ssmtp -v anders@redacted.org
[<-] 220 SG ESMTP service ready at geopod-ismtpd-8
[->] EHLO redacted.ca
[<-] 250 AUTH=PLAIN LOGIN
[->] STARTTLS
[<-] 220 Begin TLS negotiation now
[->] EHLO redacted.ca
[<-] 250 AUTH=PLAIN LOGIN
[->] AUTH LOGIN
[<-] 334 VXNlcm5hbWU6
[->] YXBpa2V5
[<-] 334 UGFzc3dvcmQ6
[<-] 235 Authentication successful
[->] MAIL FROM:<anders@redaacted.ca>
[<-] 250 Sender address accepted
[->] RCPT TO:<anders@redacted.org>
[<-] 250 Recipient address accepted
[->] DATA
[<-] 354 Continue
[->] Received: by redacted.ca (sSMTP sendmail emulation); Fri, 31 Jan 2025 22:13:24 +0000
[->] From: "root" <anders@redacted.ca>
[->] Date: Fri, 31 Jan 2025 22:13:24 +0000
[->] Test email
[->] 
[->] .
[<-] 250 Ok: queued as redacred
[->] QUIT
[<-] 221 See you later

Update:

The weird thing is I can send email from a test email plugin “check email and log” but when I send from creating a new user, no from address is attached so it gets rejected.

Still trying to figure out why no from email is being sent in my wordpress application specifcally for user invites and reset password

So if I hook in to a mu plugin i can send email, I have no idea why wordpress is not sending a from or sending the wrong from potentially because with this code addition it works but don’t see from in the logger

add_filter('wp_mail_from', function ($from) {
    return 'anders@redacted.ca'; // Must match a verified domain in SendGrid
});

Just about to set things up again and also considering Sendgrid. Only having issues reactivating the Sendgrid account now finally attached to Twilio. What is the password used in the case of Sendgrid? Is that an API key? Or a password given by Sendgrid? Or is it simply the email address’ password?

Its the API key, and I turned on mail sending ability in restricted access. It Starts with SG.redacted

1 Like