craigpaul / laravel-postmark

A Postmark adapter for Laravel
MIT License
204 stars 23 forks source link

MailMessage Template Laravel 7 Unexpected response #81

Closed DevelTwist closed 4 years ago

DevelTwist commented 4 years ago

I'm trying to use the MailMessage class to send in postmark template, the configuration is correct but I receive a json as a message to my mailbox.

this is my implementation

image

this is my response

{"env":{},"app":{"contextual":[]},"id":18999584,"alias":"user-c= onfirmation","model":{"name":"Usuario","product_name":"Maquillate= .com","action_url":"https:\/\/dev.maquillate.com\/confirmation","= login_url":"https:\/\/dev.maquillate.com\/login","username":"Usua= rio"},"laravel_notification_id":"02bb8627-5d08-485f-9122-4e7091= 79f8c1","laravel_notification":"App\Notifications\UserConfirm= ation","laravel_notification_queued":false,"message":{}}=0D=0A

image

Your environment

Include as many relevant details about the environment you experienced the bug in and how to reproduce it.

craigpaul commented 4 years ago

Hey @DevelTwist. When the package detects that it's trying to send a templated email (by checking if the body of the message can be properly JSON decoded), it includes TemplateId, TemplateAlias, and TemplateModel in the request to Postmark.

Perhaps there is an error happening when it is being decoded? It would look like it's not hitting the /email/withTemplate endpoint for some reason. Can you try adding some logging locally and see what does?

DevelTwist commented 4 years ago

Let me check

keiwerkgvr commented 4 years ago

@craigpaul we couldnt find the issue, we thought about other solution and we fixed it using http package of laravel and postmark api while you can fix this issue.

craigpaul commented 4 years ago

I'm not exactly certain I understand the problem. I'm curious if others who use this feature have experienced this. @MatanYadaev have you experienced this?

DevelTwist commented 4 years ago

@craigpaul For some reason the templated method on Transport class is not executing. Unusual

craigpaul commented 4 years ago

That's very unusual, never heard of that happening. I'm gonna try a fresh Laravel 7 install to try and reproduce this. If you're able to provide an example repo that can reproduce this problem, that would be very helpful.

craigpaul commented 4 years ago

Hey @DevelTwist, I just tried the fresh Laravel 7 install and it worked. I'm going to need to see a repo that can reproduce the error in order to assist any further.

craigpaul commented 4 years ago

I'm going to close this for now. If someone can come up with a repository to reproduce the problem, we can take another look 👍