javax.mail javax.mail-api 1.5.6 class Mailer{ Properties props = new Properties(); public Mailer(){ props.put(“mail.smtp.host”, “smtp.gmail.com”); props.put(“mail.smtp.socketFactory.port”, “465”); props.put(“mail.smtp.socketFactory.class”, “javax.net.ssl.SSLSocketFactory”); props.put(“mail.smtp.auth”, “true”); props.put(“mail.smtp.port”, “465”); } public static void send(final String from,final String password,String to,String sub,String msg){ //get Session Session session = Session.getDefaultInstance(props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(from,password); } }); //compose message try … Read More “JAVA: MAIL” »
Tag: java
java
database, java
# jpa 2.1 # This anotation allows you to change the behavior of a Lazy entity loading default, in the case the var is the atribute that # will behave like EAGUER when using a query with TypedQuery.setHint(“javax.persistence.loadgraph”, eg); # #theAtributeName: … import javax.persistence.NamedAttributeNode; import javax.persistence.NamedEntityGraph; … @NamedEntityGraph(name=”aNameToCallIt”,attributeNodes={@NamedAttributeNode(“theAtributeName”)}) @Entity @Table(name = “nameoftheTable”) public class ClassName … Read More “JPA: @namedEntityGraph” »