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

[Mime] Add NamedAddress::fromString #33086

Open
gisostallenberg opened this issue Aug 9, 2019 · 2 comments

Comments

@gisostallenberg
Copy link
Contributor

commented Aug 9, 2019

Description
I'm about to build a feature to convert an encoded address to a NamedAddress instance, but thought it might be interesting adding it in the mime component by default. This makes it easier and more readable to use addresses in configuration for example.

Example

use Symfony\Component\Mime\NamedAddress;

$address = NamedAddress::fromString("Giso Stallenberg <gisostallenberg@example.com>"); // instance of NamedAddress
$address->getName(); // Giso Stallenberg
$address->getAddress(); // gisostallenberg@example.com
@fabpot

This comment has been minimized.

Copy link
Member

commented Aug 9, 2019

Great! That looks like a good addition.

@gisostallenberg

This comment has been minimized.

Copy link
Contributor Author

commented Aug 9, 2019

Cool, I'll try to create a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.