Support » Plugin: Postmark for WordPress » Sending email on behalf of clients

  • Resolved detroitwidget

    (@detroitwidget)


    Hi Folks,

    I’m using the “Custom From Name” method (link below) along with the Postmark for WordPress plugin to send contact form notification email on behalf of my clients. I have created a unique server (API token) for each each client.

    From within my Postmark account, if I delete the server (and API token) assigned to a client, what happens to the form notification functionality on the client site?

    Thanks.

    Phil

    https://postmarkapp.com/guides/best-practices-for-sending-on-behalf-of-your-users

    Host: WP Engine
    Theme: Genesis 3.2.1
    WordPress 5.3.2
    Postmark for WordPress 1.11.6
    PHP 7.3.13
    Gravity Forms 2.4.16

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Patrick Graham

    (@prileygraham)

    Hi Phil,

    If the server is deleted (or just the token) and it is still used in the plugin settings, the Postmark API will return an error indicating the token is bad in its response to the send request made using wp_mail. The error will be logged in the plugin page’s Logs tab if you are using that feature.

    https://share.getcloudapp.com/kpumx06q

    You can capture these errors and handle them as you like, as described here:

    https://github.com/wildbit/postmark-wordpress/wiki#capture-the-last-error-from-the-plugin

    How the client side chooses to handle that error by default is dependent on the form plugin used. There is not a default rendering that will happen client side for what the person filling out the form will see if the send attempt results in an error, as far as I know.

    I tested the scenario with Ninja Forms and received the normal success notice that a confirmation email was sent but in fact it had the above mentioned error so nothing was actually sent. The WordPress instance would need something in its codebase to capture the error returned from the Postmark plugin in order to effectively alert the person filling out the form.

    You can test this to see what is rendered by default by the site and if its not to your liking, add some custom code for capturing the error and displaying a notice to the person filling out the form, if you wish.

    detroitwidget

    (@detroitwidget)

    Hi Patrick,

    Thanks for the clear explanation, and the extra time you spent on this — It’s greatly appreciated.

    You guys are exceptional.

    Phil

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sending email on behalf of clients’ is closed to new replies.