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(inbound): Bind company name from domain #62

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jonathan-marmelab
Copy link
Collaborator

Problem

  • The company name is the company domain name, which is not what the user expects

Solution

  • Improve company name parsing from domain

How To Test

  • Send a mail with inbound e-mail address

Additional Checks

@jonathan-marmelab jonathan-marmelab changed the base branch from main to feat/mail-multiple-to August 12, 2024 13:40
Base automatically changed from feat/mail-multiple-to to main August 12, 2024 14:47
});
};

export function extractCompanyName(domain: string) {
const name = domain.split('.').at(-2)!;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This won't work for second level domains, e.g. .co.uk. IMO the best thing to do is rely on a third-party lib to strip those from the domain...

@jonathan-marmelab jonathan-marmelab changed the title Feat/mail company name Feat(inbound): Bind company name from domain Aug 13, 2024
@jonathan-marmelab
Copy link
Collaborator Author

Setting up a library leads to problems with unit tests due to the incompatibility with node and Deno. We will need to invest on this to set up everything correctly

@jonathan-marmelab jonathan-marmelab marked this pull request as draft August 13, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants