Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29745

How i send email without authentication using java

$
0
0

I would like to send email without authentication using java. Can someone help me?

With authentication, I do it as follows:

    public void sendEmail() throws EmailException{
    SimpleEmail email = new SimpleEmail();
    email.setHostName("smtp.gmail.com");
    email.setSmtpPort(465);
    email.addTo("XXX@gmail.com", "XXXX");
    email.setFrom("XXXX@gmail.com","XXXXX");
    email.setSubject("testando . . .");
    email.setMsg("testando 1");
    email.setSSL(true);
    email.setAuthentication("xxxxxx@gmail.com", "XXXXX");
    email.send();
}

I forgot to say that i do not have a provider. i need an provider finally, i have emailFrom Subject and Message, and need send this email how?


Viewing all articles
Browse latest Browse all 29745

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>