Hi, I can send a test email from a stand alone page using Postmark but when I try to set the parameters in the config file it won’t work.
I’ve tried installing the Plugin but that can’t see the created function, also it seems a bit unneccisary having a plugin when you should just be able to set it in the config?
Is there something obvious that I’m missing? I’m trying to ensure that the reset password code emails from Kirby can be tracked. Any help would be greatly apprecited.
While the plugin currently only seems to implement SMTP transport, there is another option at least planned. But yes, it should be possible only with the correct transport settings.
Thanks for getting back to me, I have manged to get the example below working correctly (on a stand alone page) with the plugin but the KirbyCMS emails (password reset emails) are not being sent by Postmark, how do I tell Kirby to send all emails through Postmark?
Preformatted text// regular "transactional" email
$to = 'roger.rabbit@disney.com';
$success = kirby()->email([
'from' => new \Kirby\Cms\User([
'email' => 'postmark@example.com', // your verified postmark sender
'name' => 'Example Name', // your name
]),
'to' => $to,
'subject' => 'Sending E-Mails is fun',
'body' => [
'html' => '<h1>Headline</h1><p>Text</p>',
'text' => "Headline\n\nText",
],
'transport' => postmark()->transport(), // plugin helper to get SMTP config array
])->isSent();
Ok, after creating an account myself, I have now found what the problem is. You need a verified sender name, which you have to set with the auth config options:
Thanks very much @texnixe I tried that but I still can’t get it to authenticate, are you just using the information above without the plugin or are you using the plugin as well?
I didn’t use the plugin for testing, but just the config settings I posted above, with username and password settings from the Postmark SMTP settings page.