Andrew Khoury created EMAIL-178: ----------------------------------- Summary: setFrom no longer working Key: EMAIL-178 URL: https://issues.apache.org/jira/browse/EMAIL-178 Project: Commons Email Issue Type: Bug Affects Versions: 1.5 Reporter: Andrew Khoury
setFrom no longer works in commons-email 1.5. The code below sends the email as the authentication userid email address instead of the from address. With the code below, the from address works with commons-email 1.2. {code:none} public class TestEmailFrom { public static void main(String [] args) throws EmailException { String emailFromAddress = "fake.from.addr...@gmail.com"; String emailToAddress = "fake.to.addr...@gmail.com"; Email email = new SimpleEmail(); email.setHostName("smtp.gmail.com"); email.setSmtpPort(465); email.setAuthentication("use...@gmail.com", "password"); email.setSSLOnConnect(true); email.setFrom(emailFromAddress); email.setSubject("TestMail"); email.setMsg("This is a test mail ... :-)"); email.addTo(emailToAddress); email.send(); } } -- This message was sent by Atlassian JIRA (v7.6.3#76005)