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

Name should be optional on import #1630

Closed
russss opened this issue Dec 17, 2023 · 3 comments
Closed

Name should be optional on import #1630

russss opened this issue Dec 17, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@russss
Copy link

russss commented Dec 17, 2023

When importing contacts, the name field is required. This should be optional, as it is if you subscribe to a list though the signup form.

@russss russss added the enhancement New feature or request label Dec 17, 2023
@MaximilianKohler
Copy link
Contributor

This has been discussed before and marked "won't change".

@knadh
Copy link
Owner

knadh commented Dec 23, 2023

Name can't be blank for reasons discussed in the past, #967, #594.

However, since this keeps coming up, perhaps there's a middlepath. If there's no name given, listmonk automatically extract the name part out of the e-mail and use it. Eg: [email protected] -> username.

Any thoughts on this?

@russss
Copy link
Author

russss commented Dec 23, 2023

Yeah, if you don't specify a name in the signup form or the API then the local part of the email address gets used, and I think it's quite likely that people will need to import a list of emails without names.

In fact the only reason the import fails here is because of this additional if len(s.Name) == 0 check:

if len(s.Name) == 0 || len(s.Name) > stdInputMaxLen {

I just edited this condition out and it imported my name-less CSV fine by setting the name to the local part of the email address.

@knadh knadh self-assigned this Dec 25, 2023
@knadh knadh closed this as completed in 0d74619 Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants