Query-bibliotheekStuur een e-mail naar de beheerder
Stuur een e-mail naar de beheerder
Deze query haalt het e-mailadres van de beheerder op uit de WordPress wp_options-tabel en injecteert deze waarde in het veld to.
query ExportData {
adminEmail: optionValue(name: "admin_email")
@export(as: "adminEmail")
}
mutation SendEmailToAdmin @depends(on: "ExportData") {
_sendEmail(
input: {
to: $adminEmail
subject: "Admin notification"
messageAs: {
html: "There is a new post on the site, go check!"
}
}
) {
status
}
}