We use a GlassFish server (JavaEE 7) with JavaMail. Afaik, the official E-Mail RFC states that mail addresses may look something like this:
Tom Tester <tom.tester@test.com>
which would include a nicer representation than using only the email address. The Glassfish server is able to use this when configuring it on the admin console, clients like the GMail web client then display "Tom Tester" as sender. However, I'd like to specify the mail resource in the glassfish-resources.xml
within our project, the configuration file doesn't allow <
or >
, because it's xml. I tried
<mail-resource
from="Tom Tester <tom.tester@test.com>"
...
and
<mail-resource
from="Tom Tester tom.tester@test.com"
...
, but these configurations won't work. Both approaches end up in sending only "tom.tester@test.com" as sender. I also didn't find any specification details from the GlassFish docs. Does somebody know if the desired behaviour is possible?