Giter VIP home page Giter VIP logo

Comments (1)

bbottema avatar bbottema commented on August 17, 2024

Hi @hotmeatballsoup, the transport strategy should be enough, no need for those extra properties. I have tested the following with success:

final mail email = new Email();
email.setFromAddress("lollypop", "[email protected]");
email.addRecipient("C.Cane", "[email protected]", RecipientType.TO);
email.setText("We should meet up!");
email.setTextHTML("<b>We should meet up!</b>");
email.setSubject("hey");

new Mailer("smtp.gmail.com", 25, "your user", "your password", TransportStrategy.SMTP_TLS).sendMail(email);
new Mailer("smtp.gmail.com", 587, "your user", "your password", TransportStrategy.SMTP_TLS).sendMail(email);
new Mailer("smtp.gmail.com", 465, "your user", "your password", TransportStrategy.SMTP_SSL).sendMail(email);

Possible causes:

You have two-factor authentication enabled in gmail, in which case you need to generate an application-specific password for your test (Google App Passwords)

Your credentials are not entered correctly (if I remember correctly, you should use your username, not your email (eg. your.user instead of [email protected])). I'm currently behind a proxy myself, so I can't test it right now.

You are behind a proxy and the proxy is blocking you (but the exception doesn't seem to match this situation)

A router is blocking the outgoing ports (but again, the exception doesn't match)

Some other network issue

Simple Java Mail is very simple in regards to networking details, meaning the problem is most likely outside the library. You can enable debug logging for some more info, it might help shed some extra light on the exception (mailer.setDebug(true)).

from simple-java-mail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.