Skip to content

Commit

Permalink
Merge pull request #23 from suraj-webkul/imap-docs
Browse files Browse the repository at this point in the history
Write imap docs.
  • Loading branch information
devansh-webkul authored Sep 27, 2024
2 parents 3b17204 + 92ef079 commit d947858
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/.vuepress/version-configs/1.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +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'],
['advanced/email-inbound-parse', ' Email Inbound Parse'],
])
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/version-configs/2.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +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'],
['advanced/email-inbound-parse', ' Email Inbound Parse'],
])
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/version-configs/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +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'],
['advanced/email-inbound-parse', ' Email Inbound Parse'],
['advanced/data-transfer', 'Data Transfer'],
])
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
### **Email Integration via SendGrid Inbound Parse Webhook**
[[TOC]]

### **SendGrid Inbound Parse**

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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
### **Email Integration via SendGrid Inbound Parse Webhook**
[[TOC]]

### **SendGrid Inbound Parse**

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.

#### **Set SendGrid as the Email Receiver Driver**

In the `.env` file, ensure that the `MAIL_RECEIVER_DRIVER` is set to `sendgrid`:

```env
MAIL_RECEIVER_DRIVER=sendgrid
```

This tells Krayin CRM to use the SendGrid package to handle incoming emails.

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

1. **Create a Domain and Email in SendGrid**
Expand Down Expand Up @@ -49,3 +61,50 @@ Krayin CRM is capable of handling attachments that are sent via email. These att
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.
### **IMAP Inbound Parse**
Krayin CRM allows you to receive and manage your emails using the IMAP protocol. To integrate IMAP in Krayin CRM, we will use the **Webklex-IMAP** package as the email receiver driver.
**IMAP** (Internet Message Access Protocol) allows you to access your emails from any device without downloading them to your computer. Emails stay on the server, and you view them directly, with attachments only downloaded if needed. IMAP is ideal for accessing email on multiple devices, as any changes (like reading or deleting) are synced across all devices, making email management efficient and ensuring data consistency everywhere.
#### **Configure .env File**
To enable IMAP in Krayin CRM, you need to configure the `.env` file. Open the `.env` file in the root directory of your Laravel project and make the following changes:
```env
MAIL_RECEIVER_DRIVER=webklex-imap
IMAP_HOST=imap.example.com # Replace with your IMAP host (e.g., imap.gmail.com)
IMAP_PORT=993 # Use port 993 for IMAP with SSL encryption
IMAP_ENCRYPTION=ssl # Choose 'ssl' or 'tls' based on your server settings
IMAP_VALIDATE_CERT=true # Set this to 'true' to validate SSL certificates
IMAP_USERNAME=your_username # Replace with your IMAP account username (email address)
IMAP_PASSWORD=your_password # Replace with your IMAP account password
```

#### **Explanation of the `.env` IMAP Variables:**

- **IMAP_HOST**: The IMAP server host name (e.g., `imap.gmail.com` for Gmail, `imap.example.com` for other email providers).
- **IMAP_PORT**: The port used for IMAP communication, typically `993` for SSL.
- **IMAP_ENCRYPTION**: Defines the encryption method for secure communication. It can be `ssl` or `tls`.
- **IMAP_VALIDATE_CERT**: Set to `true` to validate SSL certificates for secure communication.
- **IMAP_USERNAME**: Your IMAP email account username, which is typically your email address.
- **IMAP_PASSWORD**: Your IMAP email account password.

#### **Set IMAP as the Email Receiver Driver**

In the `.env` file, ensure that the `MAIL_RECEIVER_DRIVER` is set to `webklex-imap`:

```env
MAIL_RECEIVER_DRIVER=webklex-imap
```

This tells Krayin CRM to use the Webklex IMAP package to handle incoming emails.

#### **Usage of IMAP in Krayin CRM**

Once the IMAP settings are configured in the `.env` file, Krayin CRM will be able to use IMAP to fetch emails from the specified email account.

Make sure to check your email provider’s documentation for the correct IMAP settings.
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
### **Email Integration via SendGrid Inbound Parse Webhook**
[[TOC]]

### **SendGrid Inbound Parse**

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.

#### **Set SendGrid as the Email Receiver Driver**

In the `.env` file, ensure that the `MAIL_RECEIVER_DRIVER` is set to `sendgrid`:

```env
MAIL_RECEIVER_DRIVER=sendgrid
```

This tells Krayin CRM to use the SendGrid package to handle incoming emails.

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

1. **Create a Domain and Email in SendGrid**
Expand Down Expand Up @@ -49,3 +61,50 @@ Krayin CRM is capable of handling attachments that are sent via email. These att
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.
### **IMAP Inbound Parse**
Krayin CRM allows you to receive and manage your emails using the IMAP protocol. To integrate IMAP in Krayin CRM, we will use the **Webklex-IMAP** package as the email receiver driver.
**IMAP** (Internet Message Access Protocol) allows you to access your emails from any device without downloading them to your computer. Emails stay on the server, and you view them directly, with attachments only downloaded if needed. IMAP is ideal for accessing email on multiple devices, as any changes (like reading or deleting) are synced across all devices, making email management efficient and ensuring data consistency everywhere.
#### **Configure .env File**
To enable IMAP in Krayin CRM, you need to configure the `.env` file. Open the `.env` file in the root directory of your Laravel project and make the following changes:
```env
MAIL_RECEIVER_DRIVER=webklex-imap
IMAP_HOST=imap.example.com # Replace with your IMAP host (e.g., imap.gmail.com)
IMAP_PORT=993 # Use port 993 for IMAP with SSL encryption
IMAP_ENCRYPTION=ssl # Choose 'ssl' or 'tls' based on your server settings
IMAP_VALIDATE_CERT=true # Set this to 'true' to validate SSL certificates
IMAP_USERNAME=your_username # Replace with your IMAP account username (email address)
IMAP_PASSWORD=your_password # Replace with your IMAP account password
```

#### **Explanation of the `.env` IMAP Variables:**

- **IMAP_HOST**: The IMAP server host name (e.g., `imap.gmail.com` for Gmail, `imap.example.com` for other email providers).
- **IMAP_PORT**: The port used for IMAP communication, typically `993` for SSL.
- **IMAP_ENCRYPTION**: Defines the encryption method for secure communication. It can be `ssl` or `tls`.
- **IMAP_VALIDATE_CERT**: Set to `true` to validate SSL certificates for secure communication.
- **IMAP_USERNAME**: Your IMAP email account username, which is typically your email address.
- **IMAP_PASSWORD**: Your IMAP email account password.

#### **Set IMAP as the Email Receiver Driver**

In the `.env` file, ensure that the `MAIL_RECEIVER_DRIVER` is set to `webklex-imap`:

```env
MAIL_RECEIVER_DRIVER=webklex-imap
```

This tells Krayin CRM to use the Webklex IMAP package to handle incoming emails.

#### **Usage of IMAP in Krayin CRM**

Once the IMAP settings are configured in the `.env` file, Krayin CRM will be able to use IMAP to fetch emails from the specified email account.

Make sure to check your email provider’s documentation for the correct IMAP settings.

0 comments on commit d947858

Please sign in to comment.