Skip to content

Commit

Permalink
Merge pull request #19 from suraj-webkul/update-docs-for-sendgrid
Browse files Browse the repository at this point in the history
update incoming email integrations docs.
  • Loading branch information
devansh-webkul authored Sep 6, 2024
2 parents a4cf447 + 790fd9b commit d800cc9
Show file tree
Hide file tree
Showing 8 changed files with 158 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/.vuepress/version-configs/1.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ module.exports = [
['advanced/override-core-model', 'Override Core Models'],
['advanced/render-event', 'View Render Event'],
['advanced/security-practice', 'Best Security Practices'],
['advanced/sendgrid-inbound-parse-webhook', ' Email Integration via SendGrid Inbound Parse Webhook'],
])
},
{
Expand Down
1 change: 1 addition & 0 deletions docs/.vuepress/version-configs/2.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ module.exports = [
['advanced/override-core-model', 'Override Core Models'],
['advanced/render-event', 'View Render Event'],
['advanced/security-practice', 'Best Security Practices'],
['advanced/sendgrid-inbound-parse-webhook', ' Email Integration via SendGrid Inbound Parse Webhook'],
])
},
{
Expand Down
1 change: 1 addition & 0 deletions docs/.vuepress/version-configs/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ module.exports = [
['advanced/override-core-model', 'Override Core Models'],
['advanced/render-event', 'View Render Event'],
['advanced/security-practice', 'Best Security Practices'],
['advanced/sendgrid-inbound-parse-webhook', ' Email Integration via SendGrid Inbound Parse Webhook'],
])
},
{
Expand Down
51 changes: 51 additions & 0 deletions docs/1.x/advanced/sendgrid-inbound-parse-webhook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
### **Email Integration via SendGrid Inbound Parse Webhook**

Krayin CRM can be integrated with SendGrid’s **Inbound Parse Webhook** to handle incoming emails. This allows emails sent to a specific domain to be automatically processed by Krayin and displayed in the **Mail > Inbox** section.

#### **Overview**
The **Inbound Parse Webhook** feature of SendGrid allows emails to be converted into HTTP POST requests and forwarded to a specified URL in your application. By integrating SendGrid with Krayin CRM, you can seamlessly receive and display incoming emails.

#### **Setting Up SendGrid Inbound Parse with Krayin CRM**

1. **Create a Domain and Email in SendGrid**
- Log into your [SendGrid account](https://app.sendgrid.com/).
- Go to **Settings** > **Inbound Parse**.
- Click **Add Host & URL** to configure a new Parse Webhook.
- Add the domain from which you want to receive emails (e.g., `example.com`).
- Under the **URL** field, specify your Krayin CRM webhook URL, which should be in the format:
```
http://yourdomain.com/admin/mail/inbound-parse
```
Replace `yourdomain.com` with your actual domain and ensure the endpoint matches your Krayin setup.
2. **Configure Krayin CRM to Receive Emails**
- Once the webhook is set up in SendGrid, all emails sent to the configured domain will be forwarded to the specified Krayin webhook.
- Krayin CRM will handle the incoming email data, including:
- **From Address:** The sender's email.
- **To Address:** The recipient (your configured email).
- **Subject:** Email subject.
- **Text/HTML Body:** Email content in plain text or HTML.
- **Attachments:** Any files attached to the email.
3. **Krayin Endpoint for Inbound Parse**
- Ensure that Krayin CRM is set up to receive the POST data from SendGrid. The email content will be sent to the following Krayin endpoint:
```
http://yourdomain.com/admin/mail/inbound-parse
```
- Krayin will parse the data sent by SendGrid, store the email information in the database, and display it in the **Mail > Inbox** section.
#### **Handling Email Attachments**
Krayin CRM is capable of handling attachments that are sent via email. These attachments will be forwarded from SendGrid to your endpoint as `multipart/form-data`. Make sure your server can process and store these files for later retrieval in the **Mail > Inbox** section of the CRM.
#### **Security Considerations**
- **Verify the Request Origin:** Ensure that incoming requests to your webhook are actually coming from SendGrid. You can verify the origin by checking headers or configuring an API key in SendGrid for additional security.
- **HTTPS:** Always use an HTTPS endpoint for secure communication between SendGrid and your server.
#### **Debugging and Testing**
- SendGrid provides tools to simulate incoming emails, which can be used to test your webhook configuration.
- Ensure that your server’s response time is efficient. SendGrid expects a response within 20 seconds. If the email processing takes longer (e.g., saving attachments), consider using asynchronous background tasks.
#### **Example Workflow**
1. A user sends an email to `[email protected]`.
2. SendGrid captures the email and forwards it to your Krayin webhook (`http://yourdomain.com/admin/mail/inbound-parse`).
3. Krayin CRM processes the incoming email, stores the details, and displays the email in the **Mail > Inbox** section.
51 changes: 51 additions & 0 deletions docs/2.0/advanced/sendgrid-inbound-parse-webhook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
### **Email Integration via SendGrid Inbound Parse Webhook**

Krayin CRM can be integrated with SendGrid’s **Inbound Parse Webhook** to handle incoming emails. This allows emails sent to a specific domain to be automatically processed by Krayin and displayed in the **Mail > Inbox** section.

#### **Overview**
The **Inbound Parse Webhook** feature of SendGrid allows emails to be converted into HTTP POST requests and forwarded to a specified URL in your application. By integrating SendGrid with Krayin CRM, you can seamlessly receive and display incoming emails.

#### **Setting Up SendGrid Inbound Parse with Krayin CRM**

1. **Create a Domain and Email in SendGrid**
- Log into your [SendGrid account](https://app.sendgrid.com/).
- Go to **Settings** > **Inbound Parse**.
- Click **Add Host & URL** to configure a new Parse Webhook.
- Add the domain from which you want to receive emails (e.g., `example.com`).
- Under the **URL** field, specify your Krayin CRM webhook URL, which should be in the format:
```
http://yourdomain.com/admin/mail/inbound-parse
```
Replace `yourdomain.com` with your actual domain and ensure the endpoint matches your Krayin setup.
2. **Configure Krayin CRM to Receive Emails**
- Once the webhook is set up in SendGrid, all emails sent to the configured domain will be forwarded to the specified Krayin webhook.
- Krayin CRM will handle the incoming email data, including:
- **From Address:** The sender's email.
- **To Address:** The recipient (your configured email).
- **Subject:** Email subject.
- **Text/HTML Body:** Email content in plain text or HTML.
- **Attachments:** Any files attached to the email.
3. **Krayin Endpoint for Inbound Parse**
- Ensure that Krayin CRM is set up to receive the POST data from SendGrid. The email content will be sent to the following Krayin endpoint:
```
http://yourdomain.com/admin/mail/inbound-parse
```
- Krayin will parse the data sent by SendGrid, store the email information in the database, and display it in the **Mail > Inbox** section.
#### **Handling Email Attachments**
Krayin CRM is capable of handling attachments that are sent via email. These attachments will be forwarded from SendGrid to your endpoint as `multipart/form-data`. Make sure your server can process and store these files for later retrieval in the **Mail > Inbox** section of the CRM.
#### **Security Considerations**
- **Verify the Request Origin:** Ensure that incoming requests to your webhook are actually coming from SendGrid. You can verify the origin by checking headers or configuring an API key in SendGrid for additional security.
- **HTTPS:** Always use an HTTPS endpoint for secure communication between SendGrid and your server.
#### **Debugging and Testing**
- SendGrid provides tools to simulate incoming emails, which can be used to test your webhook configuration.
- Ensure that your server’s response time is efficient. SendGrid expects a response within 20 seconds. If the email processing takes longer (e.g., saving attachments), consider using asynchronous background tasks.
#### **Example Workflow**
1. A user sends an email to `[email protected]`.
2. SendGrid captures the email and forwards it to your Krayin webhook (`http://yourdomain.com/admin/mail/inbound-parse`).
3. Krayin CRM processes the incoming email, stores the details, and displays the email in the **Mail > Inbox** section.
2 changes: 1 addition & 1 deletion docs/2.0/introduction/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To install Krayin using our GUI installer, you can follow any of the following m
- Once you are in the desired directory, run the following command in your terminal to install Krayin:

```sh
composer create-project Krayin/Krayin
composer create-project krayin/laravel-crm
```

- Configure your HTTP server to point to the **`public/`** directory of the project.
Expand Down
51 changes: 51 additions & 0 deletions docs/master/advanced/sendgrid-inbound-parse-webhook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
### **Email Integration via SendGrid Inbound Parse Webhook**

Krayin CRM can be integrated with SendGrid’s **Inbound Parse Webhook** to handle incoming emails. This allows emails sent to a specific domain to be automatically processed by Krayin and displayed in the **Mail > Inbox** section.

#### **Overview**
The **Inbound Parse Webhook** feature of SendGrid allows emails to be converted into HTTP POST requests and forwarded to a specified URL in your application. By integrating SendGrid with Krayin CRM, you can seamlessly receive and display incoming emails.

#### **Setting Up SendGrid Inbound Parse with Krayin CRM**

1. **Create a Domain and Email in SendGrid**
- Log into your [SendGrid account](https://app.sendgrid.com/).
- Go to **Settings** > **Inbound Parse**.
- Click **Add Host & URL** to configure a new Parse Webhook.
- Add the domain from which you want to receive emails (e.g., `example.com`).
- Under the **URL** field, specify your Krayin CRM webhook URL, which should be in the format:
```
http://yourdomain.com/admin/mail/inbound-parse
```
Replace `yourdomain.com` with your actual domain and ensure the endpoint matches your Krayin setup.
2. **Configure Krayin CRM to Receive Emails**
- Once the webhook is set up in SendGrid, all emails sent to the configured domain will be forwarded to the specified Krayin webhook.
- Krayin CRM will handle the incoming email data, including:
- **From Address:** The sender's email.
- **To Address:** The recipient (your configured email).
- **Subject:** Email subject.
- **Text/HTML Body:** Email content in plain text or HTML.
- **Attachments:** Any files attached to the email.
3. **Krayin Endpoint for Inbound Parse**
- Ensure that Krayin CRM is set up to receive the POST data from SendGrid. The email content will be sent to the following Krayin endpoint:
```
http://yourdomain.com/admin/mail/inbound-parse
```
- Krayin will parse the data sent by SendGrid, store the email information in the database, and display it in the **Mail > Inbox** section.
#### **Handling Email Attachments**
Krayin CRM is capable of handling attachments that are sent via email. These attachments will be forwarded from SendGrid to your endpoint as `multipart/form-data`. Make sure your server can process and store these files for later retrieval in the **Mail > Inbox** section of the CRM.
#### **Security Considerations**
- **Verify the Request Origin:** Ensure that incoming requests to your webhook are actually coming from SendGrid. You can verify the origin by checking headers or configuring an API key in SendGrid for additional security.
- **HTTPS:** Always use an HTTPS endpoint for secure communication between SendGrid and your server.
#### **Debugging and Testing**
- SendGrid provides tools to simulate incoming emails, which can be used to test your webhook configuration.
- Ensure that your server’s response time is efficient. SendGrid expects a response within 20 seconds. If the email processing takes longer (e.g., saving attachments), consider using asynchronous background tasks.
#### **Example Workflow**
1. A user sends an email to `[email protected]`.
2. SendGrid captures the email and forwards it to your Krayin webhook (`http://yourdomain.com/admin/mail/inbound-parse`).
3. Krayin CRM processes the incoming email, stores the details, and displays the email in the **Mail > Inbox** section.
2 changes: 1 addition & 1 deletion docs/master/introduction/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To install Krayin using our GUI installer, you can follow any of the following m
- Once you are in the desired directory, run the following command in your terminal to install Krayin:

```sh
composer create-project Krayin/Krayin
composer create-project krayin/laravel-crm
```

- Configure your HTTP server to point to the **`public/`** directory of the project.
Expand Down

0 comments on commit d800cc9

Please sign in to comment.