Issue Type: Bug Bug
Affects Versions: Backlog
Assignee: Robert Šiška
Components: Templates
Created: 05/Jan/15 10:48 AM
Description:

The pattern is used in info.magnolia.module.mail.templates.MgnlEmail.setFrom(String). If you call e.g. setFrom("Felix Rabe <[email protected]>") which is completely valid, it will go down the "else" branch, as the regular _expression_ does not match anything without '"'s or anything with a whitespace before "<".

I propose to shorten the code to just:

    public void setFrom(String _from) {
        try {
            InternetAddress address = new InternetAddress(_from, True);
            this.setFrom(address);
        }
        catch (Exception e) {
            log.error("Could not set from field of email:" + e.getMessage());
        }
    }

and remove the wrong pattern altogether.

Fix Versions: 5.2.2, 5.1.4
Project: Magnolia Mail Module
Priority: Major Major
Reporter: Robert Šiška
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to