-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Backend Code for #870 Add ability to send emails to Monica and associate it with a contact [WIP] #1311
Conversation
@djaiss Can you take a look at this PR right now it is a very rough proof of concept. What I would like focused on is the workflow lets not worry too much about the specifics of the code at this juncture. Here is the current workflow.
|
Great approach. We need to make sure that the emails do not appear in the wrong account, as users could potentially have the same contact email address for a similar contact... This is the top priority I think.
|
routes/api.php
Outdated
@@ -2,6 +2,8 @@ | |||
|
|||
use Illuminate\Support\Facades\Route; | |||
|
|||
Route::post('/emailhook', 'InBoundEmailController@new'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/inboundemail
might be a better name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
@djaiss Some of the points you made have left me questioning how you implemented the hosted version. Do you have a running instance for each user? If not comfortable answering publicly let me know and we can take that discussion privately because for this feature I think it is key for me to understand how you are running things. Below I will respond to the various points you raised.
I will be awaiting a response before preceding with any work on this PR. On a side note I have some experience with DNS and infrastructure work not too long ago I was very close to starting my own ISP I was just short on funding and had some bad breaks. So I have a solid grasp on what is at play here. |
Thanks for your answers. They've also helped me understand that I've been wrong in my answers above 😀
Of course not 😀 I have a single instance that hosts all users. To answer the other points: |
@djaiss Lets go ahead and get a review on this to see where we are at. I want to get the logic done before adding tests |
@turtles2 Sorry for the delay - I'll check this over the weekend 😀 |
@djaiss No worries, I feel like this one might take a bit to get right. |
@djaiss I have fixed the naming issues as well as implemented HashIDs for the mailbox hash. It uses the raw ID without the prefix. If you could go ahead and take another look that would be awesome. All the added code will have tests once I am confident in the behavior I need to be testing. |
@turtles2 great, thanks a lot. I'll review all this very soon! |
@turtles2 I'll take care of it. Yeah master has changed drastically. |
@djaiss When you are helping me out with that, can you go ahead and review this, as I have been waiting on that. |
https://laravel-news.com/laravel-inbound-email Also going to review this PR in the next days. Really sorry for the extremely long wait. |
We are going to replace this by https://github.com/beyondcode/laravel-mailbox instead. I'm really sorry @turtles2 that we didn't follow through with this awesome PR. |
This pull request has been automatically locked since there |
This PR will add the backend code for #870. This PR only is for getting the emails and parsing them into the DB. This code assumes the inbound processor is Postmark as that is what the hosted version uses per #1224 and I could not find a good library to add support for others. It also assumes that users are forwarding the email into Monica from there account. This could be changed but we need a way to link an email to a user.