Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MailCare Driver #114

Merged
merged 6 commits into from
Apr 3, 2024
Merged

Conversation

mailcare
Copy link

@mailcare mailcare commented Mar 2, 2023

Hello,

The current implementation of the MailCare driver doesn't work.

This PR fix all the issues and has been fully tested. I also updated the doc.

Best regards,

@eXorus eXorus mentioned this pull request Mar 5, 2023
@joelharkes
Copy link

joelharkes commented Mar 24, 2023

Implemented in fork as well: https://packagist.org/packages/joelharkes/laravel-mailbox
in this PR: eurides-eu#5

You could add additional content-type check to avoid the JSON messages (mistakenly setup) being seen as emails.

Comment on lines 11 to 14
public function validator()
{
return Validator::make($this->all(), [
'email' => 'required',
]);
return Validator::make($this->all(), []);
}
Copy link

@joelharkes joelharkes Mar 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function validator()
{
return Validator::make($this->all(), [
'email' => 'required',
]);
return Validator::make($this->all(), []);
}
public function rules()
{
return [
"content_type" => "required|in:message/rfc2822",
];
}
public function prepareForValidation()
{
$this->merge([
"content_type" => $this->headers->get("Content-type"),
]);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link

@joelharkes joelharkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@mechelon mechelon changed the base branch from master to updates February 14, 2024 08:21
@mechelon
Copy link
Member

mechelon commented Apr 3, 2024

Thanks!

@mechelon mechelon merged commit 9c62eed into beyondcode:updates Apr 3, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants