What's wrong with my send email app??

Here is my code:
<%@ page import="java.util.*,javax.mail.*,javax.mail.internet.*,javax.naming.*,java.io.*,javax.activation.*"%>
<%@ page import ="javax.mail.internet.MimeMessage"%>
<%
String content = "Hihi";
try
Properties props = new Properties();
props.setProperty("mail.transport.protocol", "smtp");
props.setProperty("mail.smtp.host", "stdsmtp.****.***.**");
props.setProperty("mail.user", "username of the server account");
props.setProperty("mail.password", "password of the server account");
Session sessionMail = Session.getDefaultInstance(props, null);
Message message = new MimeMessage(sessionMail);
Address from = new InternetAddress("an email account");
Address to = new InternetAddress("an email accout");
message.setContent(content, "text/plain");
message.setFrom(from);
message.setRecipient(Message.RecipientType.TO,to);
message.setSubject("Java Mail is easy to use");
Transport.send(message);
catch(Exception e)
e.printStackTrace();
%>
javax.mail.MessagingException: Exception reading response;
nested exception is:
java.net.SocketException: Connection reset
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260)
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 javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
at org.apache.jsp.sendEmail_jsp._jspService(sendEmail_jsp.java:72)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440)
... 31 more
What's wrong with my application?

If no one replies here try the Java Mail Forum:
http://forum.java.sun.com/forum.jspa?forumID=43

Similar Messages

  • What is wrong with the Google Earth app for iPad 3?

    I just got a new iPad 3rd gen, and the latest version of the Google Earth app.  But everytime it tries to composite the 3D info, like buildings and such, it crashes.  Every.  Single. Time. What's causing this problem?  Is it the app or the iPad?  I have an iPhone 4 and the app works fine.  Could use suggestions on how make this app work correctly.

    The app support asks me to synch the iPad to iTunes on my iMac and then to look for a particular folder on my iMac that's supposed to store crash logs, and then to attach the logs to an email to send to them to review.  But no such folder exists.  I sent them an email anyway and told them why I couldn't get the logs.  But I also noticed all the language in the app support referred only to the iPhone app, and didn't specifically referred to the iPad app, which I know has some differences, such as the 3D imaging on the iPad.   As long as I'm not looking at a map with a large city with lots of buildings, the app works fine.  But if I try to look at DC or NYC, forget it.  The app must be using too much ram and crashing.  But I don't know how to turn off the 3D feature since it seems that's what's causing the problem.  And I'm wondering if I'm the only iPad 3 user having this issue.  Like I said, the iPhone app I have works fine, but it doesn't seem to have the same 3D feature.  I really like Google Earth and use it frequently on my Macs and iPhone, but it not working on my brand new retina display iPad 3 is frustrating.  I hope I can get this corrected.

  • Any idea what's wrong with new Facebook mobile app?

    BlackBerry pushed me an updated version of the Facebook application via BlackBerry App World.  I downloaded and installed it, but this new version shows unable to connect to the server.  I will also pursue this with BlackBerry, but has anybody at VZW heard of this?  Any advice?

    well you are missing ".presence" after Guideline_Choices but I think the problem is you have the code in the wrong event. Try putting it in the exit event of Guideline_Choices and it should look like this:
    if ($ == "Fences") then
    Fences.presence = "visible"
    Roofs.presence = "hidden"
    $.presence = "hidden"
    elseif ($ == "Roofs") then
    Roofs.presence = "visible"
    Fences.presence = "hidden"
    $.presence = "hidden"
    endif

  • What's Wrong With The Blackberry 8520 App???

    Why is this website acting up? Its not letting me update my program for my phone and this includes internet,sms,etc. Can somebody help me????

    Hi!
    You are going to need a few things.
    1. Make sure you have the blackberry desktop software.
    2. Go to the RIM site and get the device software update or software. Make sure you get the software that follows your service provider and device model.
    ( To find out what your os is for your device go to the wrench icon , then status.)
    3. Install new software to device.
    4. Pull ur battery on bb.
    5. After reboot check if problem is solved.
    Good luck

  • HT3228 When I try to send an email from my Iphone it will not send and tells me the recepient will not allow relaying.  The email will sit in my outbox and then at some point will send.  It sometimes takes days.  What is wrong with my settings?

    When I try to send an email either new, or reply on my phone I receive a notification that recepient will not allow relaying.  The email will then sit in my outbox.  At some point it will send but it is hardly dependable.  What is wrong with my settings?

    The collum to the right listed similar problems.  The solution appears to be that under smtp outgoing settings the user name and password are listed as optional.  I have not plugged in the information and it seems to be working.  However from my office it always allowed the relaying.  The true test will be when I try to respond later from the road.
    Thank you for your help.

  • What is wrong with my app store?

    What is wrong with my app store? I am trying to update my apps and purchase a new one but it is not working on my iPad. It is working on my iPhone 4 though.
    I have tried turning my iPad off then on, I have tried re booting it by holding the 2 buttons at once, don't know what else to do. I have even gone in through the general settings and logged out of my apple ID then logged back in. This is annoying. I just want to buy an app!!!

    The App store appears to be having issues right now.
    Stedman

  • What's wrong with my app?

    What's wrong with my app? I tried to download it multiple times, restart, delete, repeated. It'll download, but not really finish. The app remains blackout and says downloading. Help me out please. And yes, I already followed apple's guidelines on their sight to try and resolve the issue. No luck.

    Have you tried restarting your phone? If you have and your problem is not resolved,  then best thing to do is to wait for Apple to release a new update for iOS and then re-try the download. I am sure this problem will be fixed. However, if in the next update, the problem is not resolved I recommend reporting this problem to Apple so they can fix it in their next iOS update. Hope this has helped.

  • What's wrong with IN-APP PURCHASE??? all of a sudden i couldn't do any IAP purchase anymore????

    what's wrong with IN-APP PURCHASE??? all of a sudden i couldn't do any IAP purchase anymore????

    Please note that your post is already buried in the old pages of the forum.
    Due to the current unavailability of clairvoyants and mind-readers in the forum, we respectfully request you supply sensible, complete details.
    BOILERPLATE TEXT:
    Note that because this is boilerplate text, not all points may apply to any given, specific poster.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • All of my apple sets (iphone, ipad and computer) cannot connect the app store since yesterday, what's wrong with the app store?

    All of my apple sets (iphone, ipad and computer) cannot connect the app store since yesterday, what's wrong with the app store? do you know? or do you have have the same experience?

    I still have access.  Must be your phone or your internet connection.

  • I keep getting prompts to update my Firefox to 4.0.1 but I already use 4.0.1. What's wrong with Firefox that it keeps sending these?

    I keep getting prompts to update my Firefox to 4.0.1 but I already use 4.0.1. What's wrong with Firefox that it keeps sending these prompts and what can I do to stop them?

    I keep getting prompts to update my Firefox to 4.0.1 but I already use 4.0.1. What's wrong with Firefox that it keeps sending these prompts and what can I do to stop them?

  • What is wrong with App Store?  On all of my devices it says App Store is unavailable

    What is wrong with App Store?  On all of my devices it says App Store is unavailable

    Based on posting time
    It could be off line for maintenance - picking slowest time of day.
    It could be off line because of a power failure - even with UPS(uninterrupted power source) they may want to shut down.
    Extreme melting can flood man-holes causing line failures.

  • What is wrong with the app store and how long before its fixed, im downloading atna very slow pash and i have a 10mb uncontested line.

    What is wrong with the app store and how long before its fixed, im downloading atna very slow pash and i have a 10mb uncontested line.

    Sorry, its on both my iphone 4s (2 iphones) and ipad2 that the app store is slow, I have done all the above and still when i download a 1 mb app it take about a half a hour just to download and previously it wasn't even a second. When browsing the web the devices are fast and internet speed is good, but when going in to app store it takes long to load and show me the new app, updates, featured app ect. We watch movie online and the streaming is brilliant. Even on my windows pc the app store is slow and sometimes says that i store could not be opened, i have also tried on my buddies wifi and there it does exactly the same which makes me think that its on apples side, but why do you not have any problems? 

  • What is wrong with app store iOS 6?

    What is wrong with iOS 6 on my iPod. Apps are loading and search results are empty.

    Based on posting time
    It could be off line for maintenance - picking slowest time of day.
    It could be off line because of a power failure - even with UPS(uninterrupted power source) they may want to shut down.
    Extreme melting can flood man-holes causing line failures.

  • Hello. After updating my Ipad2 to Ios5 Ive missed some Apps( pages and numbers). What's wrong with my device? Thanx

    Hello. After updating my Ipad2 to Ios5 Ive missed some Apps( pages and numbers). What's wrong with my device? Thanx

    Were the apps on your computer's iTunes when you started the update process ?
    As long as the apps are still available in the store, and you use the same iTunes account as you originally used to buy them, then you should be able to re-download them for free : http://support.apple.com/kb/HT2519 . If you download them to your computer's iTunes you could then try restoring to your backup and see if that restores them and their settings/content - a backup doesn't contain the actual apps, just their content/settings, so for the restore to work fully iTunes needs access to the apps so that it can restore them.

  • Why won't my pandora work when I'm not on wifi? I have the cellular data on for it but I never works. Also pandora isn't the only app of mine that does that.. What's wrong with it??

    Why won't my pandora work when I'm not on wifi? I have the cellular data on for it but I never works. Also pandora isn't the only app of mine that does that.. What's wrong with it??

    You're welcome.
    Voicemail is left at your carrier's server. That will continue to work unless you report your iPhone as lost or stolen with your carrier.
    You may never find it again and you can't if the iPhone remains offline or out of service which means the iPhone is powered off or doesn't have cellular reception.

Maybe you are looking for

  • New MBP, is it ok?

    Hi there, I recently sold my iMac 24" and my MacBook and bought a MBP. Im so happy with it, even though Ive been a Mac user for years, I am still really impressed with it, its the first 'Pro' Mac I've had and I love it! Im concerned that a couple thi

  • TREX not working in CV04N but works in SKPR07

    Hi there I don't normally get too involved in TREX setup (I normally hand it over to basis) but this time I've been dragged into it. We have a problem where the TREX is configured and is working. If we go to SKPR07 and index, it works and we can do s

  • Third-party item in stock transfer order

    We have the following situation: The company A receives a sales order from a external customer. The company A buys the goods to the company B (the company B is an intercompany vendor).The company B has to send the goods to the external customer direc

  • FF always opens with the addons search tab as a 2nd tab.

    After getting some new addons, I closed the addon search tab. But everytime I start FF now, the addon search results tab reappears as a 2nd tab. I can't start FF without that 2nd tab opening along with my homepage tab. How do I get it to not open whe

  • Resizing multiple photos in elements 9

    Hello, I am very new to photoshop elements and I am trying to put together a church directory. The program I am using is requiring all images be resized to 2x2.5. I have had the marketing dept. from the company type into my computer and they were onl