netcarver Posted July 8, 2021 Share Posted July 8, 2021 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: 13 1 Link to comment Share on other sites More sharing options...
netcarver Posted July 23, 2021 Author Share Posted July 23, 2021 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. 3 Link to comment Share on other sites More sharing options...
eydun Posted February 6, 2023 Share Posted February 6, 2023 I get this error, when trying to install the module. Might it be caused by that I am on PHP 8.1? Link to comment Share on other sites More sharing options...
netcarver Posted February 6, 2023 Author Share Posted February 6, 2023 @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. Link to comment Share on other sites More sharing options...
netcarver Posted February 6, 2023 Author Share Posted February 6, 2023 @eydun Can you try the new version of the module, here. You can just replace the entirity of the file called WireMailPostmark.module.php with the linked code. Link to comment Share on other sites More sharing options...
eydun Posted February 6, 2023 Share Posted February 6, 2023 Thank you for the prompt reply. Now it gives an error on line 628: Link to comment Share on other sites More sharing options...
netcarver Posted February 6, 2023 Author Share Posted February 6, 2023 @eydun Can you edit that file, line 628, and make it read as follows... $f->description = $this->_("Choose which types of tracking you'd like."); Link to comment Share on other sites More sharing options...
eydun Posted February 6, 2023 Share Posted February 6, 2023 Thanks, it is working now! Thank you for building this module. Postmark er also my preferred mail-gateway. Link to comment Share on other sites More sharing options...
Sanyaissues Posted June 19 Share Posted June 19 Hi @netcarver,I was testing some WireMail integrations and it wasn't possible to install WiremailPostmark: Requires ProcessWire > 3.0.33 PHP 8.1.212.17 >= .selfMIN_PHP Spoiler Thanks. Link to comment Share on other sites More sharing options...
netcarver Posted June 21 Author Share Posted June 21 @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. Link to comment Share on other sites More sharing options...
Sanyaissues Posted June 22 Share Posted June 22 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 Output: 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..) 1 Link to comment Share on other sites More sharing options...
netcarver Posted June 22 Author Share Posted June 22 @Sanyaissues Thank you - I can reproduce this now and will dive into it this evening. 1 Link to comment Share on other sites More sharing options...
netcarver Posted June 23 Author Share Posted June 23 @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. Link to comment Share on other sites More sharing options...
Sanyaissues Posted June 26 Share Posted June 26 ProcessWire > 3.0.33 ? PHP >= 7.2.0 ? It's working @netcarver. Glad you got it. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now