Currently, our application uses a javax.mail to send email, using javax.mail.MailMessage. We set the From headers of the email this way:
Message msg = new Mi
OK, reading documentation about ALL the classes involved would have been helpful. The correct syntax should be
Message msg = new MimeMessage(mailSession);
msg.setFrom(new InternetAddress("mail@companyxyz.com", "Company XYZ"));
Source: https://javamail.java.net/nonav/docs/api/javax/mail/internet/InternetAddress.html