WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

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

@Dodger77

Description

@Dodger77
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions