commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Khoury (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (EMAIL-178) setFrom no longer working
Date Thu, 19 Apr 2018 16:00:00 GMT

     [ https://issues.apache.org/jira/browse/EMAIL-178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrew Khoury updated EMAIL-178:
--------------------------------
    Description: 
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.address@gmail.com";
        String emailToAddress = "fake.to.address@gmail.com";

        Email email = new SimpleEmail();
        email.setHostName("smtp.gmail.com");
        email.setSmtpPort(465);
        email.setAuthentication("userid@gmail.com", "password");
        email.setSSLOnConnect(true);
        email.setFrom(emailFromAddress);
        email.setSubject("TestMail");
        email.setMsg("This is a test mail ... :-)");
        email.addTo(emailToAddress);
        email.send();
    }
}
{code}

  was:
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.address@gmail.com";

String emailToAddress = "fake.to.address@gmail.com";

Email email = new SimpleEmail();

email.setHostName("smtp.gmail.com");

email.setSmtpPort(465);

email.setAuthentication("userid@gmail.com", "password");

email.setSSLOnConnect(true);

email.setFrom(emailFromAddress);

email.setSubject("TestMail");

email.setMsg("This is a test mail ... :-)");

email.addTo(emailToAddress);

email.send();

}

}
{code}


> 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
>            Priority: Major
>
> 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.address@gmail.com";
>         String emailToAddress = "fake.to.address@gmail.com";
>         Email email = new SimpleEmail();
>         email.setHostName("smtp.gmail.com");
>         email.setSmtpPort(465);
>         email.setAuthentication("userid@gmail.com", "password");
>         email.setSSLOnConnect(true);
>         email.setFrom(emailFromAddress);
>         email.setSubject("TestMail");
>         email.setMsg("This is a test mail ... :-)");
>         email.addTo(emailToAddress);
>         email.send();
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message