I'm using Sparkpost client library for java.
When I set a fromEmail
and username
to contentAttributes
I expect to see Name Name instead of name@mydomain.com in email I have got. But it doesn't work. Is there any way to show Name instead of Email in message?
place where I need my name instead of email address
TemplateContentAttributes contentAttributes = new TemplateContentAttributes();
AddressAttributes addressAttributes = new AddressAttributes();
addressAttributes.setName(username);
addressAttributes.setEmail(fromEmail);
contentAttributes.setFrom(addressAttributes);
contentAttributes.setSubject(subject);
contentAttributes.setHtml(html);
contentAttributes.setText(text);