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

Default initialization for vmime::mailbox (vmime::emailAddress) #295

Closed
jengelh opened this issue Jan 26, 2024 · 1 comment
Closed

Default initialization for vmime::mailbox (vmime::emailAddress) #295

jengelh opened this issue Jan 26, 2024 · 1 comment

Comments

@jengelh
Copy link
Contributor

jengelh commented Jan 26, 2024

Testcase:

#include <vmime/mailbox.hpp>
int main()
{
        vmime::mailbox mb;
        printf(">%s<\n", mb.generate().c_str());
        mb.setEmail("");
        printf(">%s<\n", mb.generate().c_str());
        return 0;
}

Observed output:

>@<
>invalid@invalid<

Expected output:

>invalid@invalid<
>invalid@invalid<

What do you think? Should the default ctor produce something that is at least syntactically valid?

@jengelh jengelh changed the title Default initialization for vmime::mailbox Default initialization for vmime::mailbox (vmime::emailAddress) Jun 11, 2024
@jengelh
Copy link
Contributor Author

jengelh commented Jun 11, 2024

I think we can leave it as-is. Only vmime::emailAddress::parse enforces the RFC2822 conformance, everything else does not care.

@jengelh jengelh closed this as completed Jun 11, 2024
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

No branches or pull requests

1 participant