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

Impossible to use email and name for from email configuration #175

Open
Dodger77 opened this issue Nov 25, 2024 · 0 comments
Open

Impossible to use email and name for from email configuration #175

Dodger77 opened this issue Nov 25, 2024 · 0 comments

Comments

@Dodger77
Copy link

Q A
Bug? yes
New Feature? no
Community Bundle Version 17e2867
Sulu Version 2.6.5
Browser Version n/a

Actual Behavior

Sending the password forgotten form leads to the following exception:

Email "From name" does not comply with addr-spec of RFC 2822.

Expected Behavior

What is the behavior you expect?

Steps to Reproduce

Using password forget feature with following sulu_community.yaml

sulu_community:
    webspaces:
        my-webspace:
            from:
                email: '[email protected]'
                name: 'From name'

The structure of CommunityManagerCompilerPass and MailFactory differ, e.g. for from email:

$webspaceConfig[Configuration::EMAIL_FROM][Configuration::EMAIL_FROM_EMAIL] => $webspaceConfig[Configuration::EMAIL_FROM][Configuration::EMAIL_FROM_NAME],

The config structure results to following array:

['[email protected]' => 'From name']

but

$email = $address[\array_keys($address)[0]];
results to the value 'From name', not the key '[email protected]'.

Possible Solutions

Fixing MailFactory::getAddress() in order to work with current configuration structure.

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