spatie / mailcoach-support

Questions and support for Mailcoach
https://mailcoach.app
31 stars 2 forks source link

SES configuration set header does not get set on fresh composer install #273

Closed tobyzerner closed 3 years ago

tobyzerner commented 3 years ago

Just spent a frustrating amount of time trying to work out why I wasn't getting any open/click/bounce stats. SES configuration double and triple-checked. SNS webhook confirmed. Realised that emails I was sending from Mailcoach were not having link URLs replaced to track clicks, even though I had set up and specified a configuration set to do so. Was working fine when sending a test email from within SES.

Turns out, Mailcoach is just not setting the configuration set header. This is happening on a default composer create-project spatie/Mailcoach install following the docs to a tee.

The problem – in AddConfigurationSetHeader, we've got:

        if (! in_array('ses', [config('mail.driver'), config('mail.default')])) {
            return;
        }

However, in the default installation, config('mail.driver') is empty and config('mail.default') is set to mailcoach. So, the configuration set header doesn't get added.

riasvdv commented 3 years ago

I've added a new release of the ses feedback package that also checks mail.mailers.mailcoach.transport for 'ses'

https://github.com/spatie/laravel-mailcoach-ses-feedback/releases/tag/2.3.2

If this doesn't solve the issue, you can reopen this.

tobyzerner commented 3 years ago

Thank you!