Postmark integration for self-hosted

Hi Hillel,

I’ve been trying to use the existing PHP Mail and SMTP to integrate Postmark for sending emails to my clients. When I try to send an email I get the error “does not comply with RFC 2822, 3.6.2.”

I am guessing this is because Postmark doesnt use usernames and passwords ([email protected]) but instead an API token as the username.

Is there a way to get around this or do you recommend an alternative configuration for self-hosted? I don’t want to use Zapier quite yet as it’s yet other thing to design and configure on my server.

Also, is there any preference / difference between the mail drivers?

Thanks,

For Postmark I’d suggest using their API instead by setting a value for POSTMARK_API_TOKEN in the .env file. This would also enable supporting Postmark bounce and open notifications.

More info here: https://www.invoiceninja.com/self-host/

Hi, I tried that and now I’m getting the following fatal error:

FatalErrorException in LaravelMailProvider.php line 60:
Call to undefined method Illuminate\Mail\Mailer::setLogger()

recommenting the API_KEY line fixes this. I’ve also set Postmark to the proper bounce, open, and allow open tracking permisisons.

I think this is the issue you’re seeing when using the Postmark API

https://github.com/invoiceninja/invoiceninja/issues/797

We’ll try to get this fixed within the next few days.

Great thanks!

Also - I used the fix suggested in GitHub by your link and it worked perfectly. So anyone else experiencing this can simply update that component in Composer, make that small PHP edit, and you’re all set.