Send emails via mutation using WpGraphQl

Overview

WPGraphQL Send Email Plugin

WPGraphQl Yoast SEO Plugin

One of the simple things about a traditional WordPress sites is sending emails, this plugin makes it easy to do this via a simple mutation when you are using WPGraphQL.

Features

  • Set list of allowed origins in admin
  • Set CC address in admin
  • Set default From address in admin

Composer

composer require ashhitch/wp-graphql-send-mail

Usage

mutation SEND_EMAIL {
  sendEmail(
    input: {
      to: "[email protected]"
      from: "[email protected]"
      subject: "test email"
      body: "test email"
      clientMutationId: "test"
    }
  ) {
    origin
    sent
    message
  }
}

To try stop unauthorised emails you can set a list of domains that can send emails through the mutation.

These are set under Settings > WPGraphQL Mail from your WordPress Admin

Support

Open an issue

Other WpGraphQl Plugins

Want to get Yoast data via WPGraphQL? Checkout my other plugin

Mail Icon by Good Ware

You might also like...
WPGraphQL FacetWP integration plguin
WPGraphQL FacetWP integration plguin

WPGraphQL-FacetWP: WPGraphQL provider for FacetWP Quick Install Download and install like any WordPress plugin. Documentation The WPGraphQL documentat

WPGraphQL for Meta Box

WPGraphQL-MetaBox: WPGraphQL provider for Meta Box Quick Install Download and install like any WordPress plugin. Documentation The WPGraphQL documenta

 This is an extension to the WPGraphQL plugin for Yoast SEO
This is an extension to the WPGraphQL plugin for Yoast SEO

WPGraphQl Yoast SEO Plugin Please note version 14 of the Yoast Plugin is a major update. If you are stuck on version of Yoast before V14 then use v3 o

Add WooCommerce support and functionality to your WPGraphQL server

WPGraphQL WooCommerce (WooGraphQL) Docs • AxisTaylor • Join Slack Quick Install Install & activate WooCommerce Install & activate WPGraphQL Download t

🔍️ A WordPress plugin to automatically send a user to the page or post if it's the only search result available.

One Search Result A WordPress plugin to automatically send a user to the page or post if it's the only search result available. When there is only one

Adds meta data registered via register_meta() to the GraphQL output.

WP GraphQL Meta This plugin is an add-on for the awesome WP GraphQL It builds on top of both WP GraphQL and the REST API. Any meta data you register u

Wordpress integrated with Laravel via Composer. Together, but independents.
Wordpress integrated with Laravel via Composer. Together, but independents.

Wordpress integrated with Laravel via Composer. Atention! The branch master is no longer manteined. Now I'm working on branch light. Not booting Larav

🚀WordPress Plugin Boilerplate using modern web techs like TypeScript, SASS, and so on... on top of a local development environment with Docker and predefined GitLab CI for continous integration and deployment!
🚀WordPress Plugin Boilerplate using modern web techs like TypeScript, SASS, and so on... on top of a local development environment with Docker and predefined GitLab CI for continous integration and deployment!

WP React Starter: WordPress React Boilerplate DEPRECATED: WP React Starter was a "research project" of devowl.io for the development of our WordPress

A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.

WP Bootstrap Navwalker This code in the main repo branch is undergoing a big shakeup to bring it in line with recent standards and to merge and test t

Comments
  • Feature request: Send attachments

    Feature request: Send attachments

    I think it would be a great feature to be able to send attachments through the plugin.

    At the moment i'm implementing a "work with us" on which a user can attach a CV and i'm not sure how to go about with it.

    If you have any suggestion or if the plugin is already able to do that i'm all ears :).

    enhancement 
    opened by matteocarpi 2
  • feat(headers): added flow for custom headers

    feat(headers): added flow for custom headers

    Email setting or query variables will overwrite the custom headers like here

    if (isset($from) && !empty($from)) {
        $headers[] = 'From: ' . $from;
    } else if (isset($defaultFrom) && !empty($defaultFrom)) {
         $headers[] = 'From: ' . $defaultFrom;
    }
    

    Fixes #3

    opened by mikecabana 0
  • Can't manually set email headers

    Can't manually set email headers

    I'd like to be able to solve the following use case

    $to = "[email protected]";
    $header = "FROM: John Doe<[email protected]>";  <------ ex: set the FROM value with a name
    $message = "Your message here.";
    $subject = "Your subject";
    

    As of now it looks like the FROM defaults to WordPress

    opened by mikecabana 4
Releases(v1.2.0)
Owner
Ashley Hitchcock
Slinger of Divs, Slayer of JavaScript, hater of !important, survivor of IE6
Ashley Hitchcock
WPGraphQL Extension: Adds "meta_query" support to postObject connection queries using WP_Query

WPGraphQL Meta Query This plugin adds Meta_Query support to the WP GraphQL Plugin for postObject query args. Why is this an extension and not part of

WPGraphQL 42 Nov 10, 2022
Enable query locking for WPGraphQL by implementing persisted GraphQL queries.

?? WP GraphQL Lock This plugin enables query locking for WPGraphQL by implementing persisted GraphQL queries. Persisted GraphQL queries allow a GraphQ

Valu Digital 21 Oct 9, 2022
[ALPHA] Implementation of persisted queries for WPGraphQL

WPGraphQL Persisted Queries Persisted GraphQL queries allow a GraphQL client to optimistically send a hash of the query instead of the full query; if

Quartz 18 Jun 20, 2022
An WPGraphQL extension that adds SearchWP's query functionality to the GraphQL server

QL Search What is QL Search? An extension that integrates SearchWP into WPGraphQL. Quick Install Install & activate SearchWP v3.1.9+ Install & activat

Funkhaus 11 May 5, 2022
Structured content blocks for WPGraphQL

WPGraphQL Content Blocks (Structured Content) This WPGraphQL plugin returns a WordPress post’s content as a shallow tree of blocks and allows for some

Quartz 72 Oct 3, 2022
WPGraphQL Polylang Extension for WordPress

WPGraphQL Polylang Extension Extend WPGraphQL schema with language data from the Polylang plugin. Features For posts and terms (custom ones too!) Adds

Valu Digital 102 Dec 29, 2022
a wordpress plugin that improves wpgraphql usage together with wpml

WPGraphQL WPML Extension Contributors: rburgst Stable tag: 1.0.6 Tested up to: 5.6.1 Requires at least: 4.9 Requires PHP: 7.0 Requires WPGraphQL: 0.8.

null 42 Dec 15, 2022
WPGraphQL for Advanced Custom Fields

WPGraphQL for Advanced Custom Fields WPGraphQL for Advanced Custom Fields automatically exposes your ACF fields to the WPGraphQL Schema. Install and A

WPGraphQL 558 Jan 8, 2023
Wordpress wrapper to expose Carbon Fields to WpGraphQL queries.

WpGraphQLCrb A Wordpress wrapper to expose Carbon Fields to WpGraphQL queries. Important This is just the first version. There is a lot of work to be

Matheus Paiva 16 Aug 19, 2022
Adds Settings to the Custom Post Type UI plugin to show Post Types in WPGraphQL

DEPRECATION NOTICE ?? Custom Post Type UI v1.9.0 introduced formal support for WPGraphQL!!! ?? With that, this plugin is being deprecated and will no

WPGraphQL 77 Aug 3, 2022