Jump to content

Recommended Posts

Posted

Pete and I have been using Postmark in some PW based projects at reasonable scale (>13k emails a month) and have found it to be an exceptionally good API-based transactional email provider with fast delivery times and great availability. It seems strange that there is no WireMail offering (as far as we know of anyway) that supports Postmark, so we thought we'd throw one together in case anyone else in the community wants to give Postmark a try.

NB: This is not the code we use in our production systems, just a rainy-day project to fill a gap in the WireMail ecosystem. However, it should be sufficient to get you going with Postmark.

We hope you find it useful and please let us know if you find any issues.

WireMailPostmark module on Netcarver's github account.

Screenshot from my test account:
Selection_165.thumb.png.c24ceb9e792f12a3a5fb5ee2d5736adc.png

  • Like 13
  • Thanks 1
  • 2 weeks later...
Posted

Just bumped this to version 0.5.0 which adds the ability to have a sandbox server token that gets used if the site is in debug mode.

  • Like 3
  • 1 year later...
Posted

@eydun Thank you for the post - doesn't look like this is PHP 8.1 related - will take a look and get back to you.

Updated to add: Postmark have changed their Status API - something this module uses - and that is causing the breakage you are seeing above.

  • 1 year later...
Posted

@Sanyaissues Thanks for reporting. I must admit, I'm stumped by this as the PHP looks OK to me - it's a simple string concatenation. Perhaps @ryan can chip in and let us know if the module loading code tries to find the PHP string by pattern matching on the text of the module file, rather than running the function - though I doubt that's the case.

Anyway, could you try replacing the getModuleInfo() function with the following in the WiremailPostmark.module.php file...

    public static function getModuleInfo() {
        $php_version = 'PHP>=' . self::MIN_PHP;
        return [
            'name'        => self::MYCLASS,
            'title'       => 'WireMail for Postmark',
            'author'      => 'Netcarver & Pete of Nifty Solutions',
            'summary'     => 'Allows Processwire to send transactional email via Postmark',
            'href'        => 'https://postmarkapp.com',
            'version'     => '0.5.3',
            'autoload'    => true,
            'singular'    => false,
            'permanent'   => false,
            'requires'    => [
                'ProcessWire>3.0.33',
                $php_version,
            ],
        ];
    }

...and try reloading and installing the module? Please post a screenshot of the errors (if any).

Also, what version of ProcessWire are you running?

Thanks.

Posted

Hi @netcarver,I'm running PW 3.0.240 here. When I was testing the 'requires'=> ['ProcessWire>3.0.33', $php_version] fix, I noticed that if I search the module from the directory, the error appears

Spoiler

Step 1
image.png.94ea5922c47d9773e7db761be964dc3f.png

 

Output:
image.png.6abcd187977955c585f28f5806bbb653.png

But if I try to install by using any of the other options: module from URL (https://github.com/netcarver/WireMailPostmark/archive/main.zip), from upload or manually the value renders without problem: ProcessWire>3.0.33, PHP>=7.2.0 (Before each test I deleted the module folder, clear the compiled files, hit the refresh module button, etc..)

  • Thanks 1
Posted

@Sanyaissues Please could you try again. I've updated the module to work around what looks like a limitation in the way the module directory parses the requirements defined in module files.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...