Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners java code to send an email
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


srikanth
java code to send an email
1 Answer(s)      3 years and 3 months ago
Posted in : Java Beginners


i developed one java code that has to send a mail but i am getting an runtime exception calledjavax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465; nested exception is: java.net.ConnectException: Connection refused: connect at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370) at javax.mail.Service.connect(Service.java:275) at javax.mail.Service.connect(Service.java:156) at Mail.sendMail(Mail.java:133) at Mail.main(Mail.java:40) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:520) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:545) at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141) at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232) at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:163) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)


Advertisement
View Answers

July 27, 2011 at 11:07 AM


Please go through the following link:

Java Mail Examples



Related Tutorials/Questions & Answers:
java code to send an email
java code to send an email  i developed one java code that has to send a mail but i am getting an runtime exception calledjavax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465; nested
java code to send email using gmail smtp server
java code to send email using gmail smtp server  please send me the java code to send email using gmail smtp server. and how to send verification code
Advertisements
how to send sms on mobile and email using java code
how to send sms on mobile and email using java code  hi.... I am developing a project where I need to send a confirmation/updation msg on clients mobile and also an email on their particular email id....plz help me to find
How to send and recieve email by using java mailserver
How to send and recieve email by using java mailserver  How to send and receive email by using java mail server?   Hi Friend, Please visit the following link: Java Mail Thanks
how to send email please give me details with code in jsp,servlet
how to send email please give me details with code in jsp,servlet  how to send email please give me details with code in jsp,servlet
send email with attachments in servlet
send email with attachments in servlet  How can we send an email with attachments in servlet?   Send attached email in Java Servlet
This code send email two times but i want only once
This code send email two times but i want only once   public void dbbackup_notify(String email,String data,String subject){ String toEmails = email; Session session=Session.getInstance(props, new
This code send email two times but i want only once
This code send email two times but i want only once   public void dbbackup_notify(String email,String data,String subject){ String toEmails = email; Session session=Session.getInstance(props, new
how to send email
how to send email  hii i am new for jsp-servlet and i am making a project in jsp-servlet. i want to send the email after registration to client.please send me code that how to send mail after client registration. thank you
please send code - Java Beginners
please send code  hai friends plese provide code for fallowing program(CORE JAVA) i am taking string from commandprompt like 'AC2E4T45hj789' now... number it should be taken as single number) URGENTLY send the code
send HTML Email with jsp and servlet
send HTML Email with jsp and servlet  Can You please show me how to send html Email using JSP and Servlet thank you
Email Validation code - Java Interview Questions
Email Validation code  Can anybody tell me how to write email validation code using java   Hi Friend, Please visit the following link: http://www.roseindia.net/tutorial/java/core/regularExpressions.html Thanks
how to send contact detail in email
how to send contact detail in email  hi...all of u.....i am work... problem...frnd how to send a contact form detail mail on a click submit button...%"><b>Email:</b></td> <td width="100%"><input
Send Email From JSP & Servlet
J2EE Tutorial - Send Email From JSP & Servlet... webserver, using JavaMail API, the following code shows how the required... classpath to c:\jsdk2.0\src (java servlet development kit).  (We are using
how to send html email from dreamweaver
how to send html email from dreamweaver  how to send html email from dreamweaver
how to send email in php and attech with any file
how to send email in php and attech with any file  how to send email and attech with any file like text, image, video
Send email as html with embedded images as background
Send email as html with embedded images as background  Hi, I am developing a PHP mailing application. I have to send image in the email as attachment. Give me solution for sending image in the email data. Thanks
Java Email
Java Email  I am making one java email applications using jsp-servlets. can you tell me that how can i recieve and send email dynamically in my application in UI... thanx.   Hi, Please read at Email From JSP &
email search code in php
email search code in php  email search with multiple option in php
send me javascript code - Java Beginners
send me javascript code  please send me code javascript validation code for this html page.pleaseeeeeeeee. a.first:link...          Hi friend, complete code
how to send email list of email address through in database table list
how to send email list of email address through in database table list  package com.com; import java.io.IOException; import java.io.PrintWriter...(); } finally{ } //return true; } } print("code sample
code for email - Spring
code for email  i want a java code using springs after login process sending an email to the corresponding with a text message to them as successfully registered  Hi Friend, Please visit the following links: http
java source code to send group mails using struts2
java source code to send group mails using struts2  code to send group mails using struts2
struts2 email code
struts2 email code  when I tried the code of sending email suggested by you on when I tried the code of sending email suggested by you on giving following exception. com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must
Java Email
Java Email  i am writting a program to send emails using gmail smtp server. I had the following error: java.lang.ClassFormatError: Absent Code...) Exception in thread "main" Java Result: 1 BUILD SUCCESSFUL (total time: 6 seconds
Send E-mail in HTML
Send E-mail in HTML       The Tutorial describes you a code that help you to send Email... to send email from HTML page. In this page user can enter Name, Email -id
pls send me the code for login and register - Java Beginners
pls send me the code for login and register  pls immediately send me the jsp code for login and registration with validation with java bean in mysql database...  Hi friend, This login action code
How to send Email automatically On Daily Basis Using Systems Date.
How to send Email automatically On Daily Basis Using Systems Date.  Hello Sir, I am working on a project in which i have to send emails automatically based on system dates with attchements .Kindly give me the code
pls send code
pls send code   pls send code for set database value into text box based on selected value in struts and jsp   use any database and get its code for getting values from google
Pls send code
Pls send code   I am Mohini Charankar suppose Name="Mohini" Edit Button Click on that I change my Name with "Mohini/" Save it and page refresh After... an error pls send code
sending email code - JSP-Servlet
sending email code  How To Send Emails using jsp  Hi friend, I am sending you a link. This link will help you. Please visit for more information. http://www.roseindia.net/mail/sending-an-email
Advertisements
 

 

 

DMCA.com