Friday, January 10, 2014

gmail on AppEngine

Hello i try to send mail with an gwt application deployed on gooogle AppEngine
with the  gmail owner of the application on cloud

but it doesn't connect can't even make a send message

Bonjour j'essaie d'envoyer des mails sur une appli gwt deployée sur Google AppEngine avec le gmail du propriétaire mais cela ne fonctionne pas
why ?

thank's by advance

String host = "auth.smtp.1and1.fr"; //Saic  Mail  	    String port = "587";     	    	host = "smtp.gmail.com";  	    	port ="587";     	    Properties props = new Properties();        		    props.put("mail.smtp.host", host);  		    props.put("mail.smtp.user", username);  		    props.put("mail.smtp.password", password);     		    props.put("mail.transport.protocol", "smtp");  		    props.put("mail.smtp.auth", "true");  		    props.put("mail.smtp.ssl.enable", "false");  		    props.put("mail.smtp.starttls.enable", "true");  		    props.put("mail.smtp.tls", "true");   		    props.put("mail.smtp.port", port);	         		    props.put("mail.smtp.socketFactory.class", "javax.net.SocketFactory");  		    props.put("mail.smtp.ssl.trust", host);	    	     			        Session session;     			        	session = Session.getDefaultInstance(props,  			                    new javax.mail.Authenticator() {  			                        protected PasswordAuthentication getPasswordAuthentication() {  			                            return new PasswordAuthentication(  			                            		username, pword );  			                        }  			                    });     			        try {  				        Transport transport = session.getTransport("smtp");     			            transport.connect(host, username, password);        			            transport.close();  			            System.out.println ("connect ok");

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate