Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error send email #9

Open
Mohammad-Ravand opened this issue May 2, 2024 · 2 comments
Open

error send email #9

Mohammad-Ravand opened this issue May 2, 2024 · 2 comments

Comments

@Mohammad-Ravand
Copy link

i installed plugin on my wordpress locally.
this is my query i want to run in GraphiQL IDE
mutation SEND_EMAIL {
sendEmail(
input: {to: "[email protected]", from: "[email protected]", subject: "test email", body: "test email", clientMutationId: "test"}
) {
origin
sent
message
}
}

but i get this error every time:

{
"data": {
"sendEmail": {
"origin": "http://localhost:8000",
"sent": false,
"message": "Email failed to send"
}
},
"extensions": {
"debug": [
{
"type": "DEBUG_LOGS_INACTIVE",
"message": "GraphQL Debug logging is not active. To see debug logs, GRAPHQL_DEBUG must be enabled."
}
],
"graphqlSmartCache": {
"graphqlObjectCache": []
}
}
}

@henrikwirth
Copy link

henrikwirth commented Sep 12, 2024

I also get this error recently. Must have come from some WordPress or WPGraphql update since it used to work fine for me.

@henrikwirth
Copy link

Actually seems like it was an Host problem for me. They changed their PHPMailer settings, so that the from email address has to be one the has the same domain and it has to exist on the host. Maybe it's something similar for you @Mohammad-Ravand ? You can try logging phpmailer errors by adding a php.ini file on the wordpress index.php folder with:

sendmail_path=/usr/sbin/sendmail -t -i -X mail.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants