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

feat: imap work and enhancement #1620

Merged
merged 22 commits into from
Jan 17, 2025
Merged

feat: imap work and enhancement #1620

merged 22 commits into from
Jan 17, 2025

Conversation

devansh-webkul
Copy link
Member

No description provided.

@devansh-webkul devansh-webkul marked this pull request as draft September 19, 2024 13:24
@devansh-webkul devansh-webkul marked this pull request as ready for review September 23, 2024 11:10
@mrvnklm
Copy link

mrvnklm commented Nov 12, 2024

Do you have any ETA an when this feature will be released?

@ashishkumar-webkul
Copy link
Collaborator

@devansh-webkul sir
CC: @suraj-webkul

This PR is having conflict and hence I was unable to merge this and test it. Kindly resolve the conflicts and assign for testing.

@suraj-webkul
Copy link
Collaborator

Hello @ashishkumar-webkul Sir,

You can now test this PR. There are two failing test cases that need to be discussed with @devansh-webkul Sir.

@ashishkumar-webkul
Copy link
Collaborator

INFO:

@devansh-webkul sir and @suraj-webkul

We need to update the dependency of composer require webklex/laravel-imap as after PR is merged in system it is showing issue in terminal.

I have updated with composer require webklex/laravel-imap and it is working fine now.

Screenshot from 2024-12-17 11-23-35

Screenshot from 2024-12-17 11-22-08

@ashishkumar-webkul
Copy link
Collaborator

ashishkumar-webkul commented Dec 17, 2024

**Suggestion for Mandatory Fields and Validation ** - Host, Port, Encryption Type, IMAP Username, IMAP Password these must be mandatory fields and need to have Validations.

Here are the mandatory fields and suggested validations for setting up IMAP:


1. Host

  • Mandatory: Yes
  • Validation:
    • Must be a valid hostname or IP address (e.g., imap.example.com or 192.168.1.1).
    • Regex for domain name: ^(?!-)[A-Za-z0-9-]{1,63}(?<!-)\.(?!-)([A-Za-z0-9-]{1,63}\.)*[A-Za-z]{2,6}$.
    • Regex for IP address: ^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)$.

2. Port

  • Mandatory: Yes
  • Validation:
    • Must be a numeric value.
    • Typically, valid port ranges are 1–65535.
    • Common IMAP ports:
      • 143 for unencrypted or STARTTLS.
      • 993 for SSL/TLS.
    • Suggested Regex: ^(143|993|[0-9]{1,5})$.

3. Encryption Type

  • Mandatory: Yes
  • Validation:
    • Must be one of the following:
      • None
      • STARTTLS
      • SSL/TLS
    • Case-insensitive matching.
    • Suggested Regex: ^(None|STARTTLS|SSL\/TLS)$.

4. IMAP Username

  • Mandatory: Yes
  • Validation:
    • Must not be empty.
    • Should allow valid email addresses or usernames based on server configuration.
    • Regex for email: ^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$.

5. IMAP Password

  • Mandatory: Yes
  • Validation:
    • Must not be empty.
    • Can include special characters to support secure passwords.
    • Minimum and maximum length (e.g., 8–64 characters) for better security.

@devansh-webkul devansh-webkul merged commit 1e463e2 into master Jan 17, 2025
6 of 8 checks passed
@devansh-webkul devansh-webkul deleted the imap-work branch January 17, 2025 07:40
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