How to solve this problem javax.mail.AuthenticationFailedException

i was used in this progrm my labtop means working correctly but instead of labtop i am using the desktop means following error is occuered can any one tell to me how to solve this problem.The erroe is **javax.mail.AuthenticationFailedException**
The coding is as followes
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class Main
String d_email = "[email protected]",
d_password = "inst9",
d_host = "smtp.gmail.com",
d_port = "465",
m_to = "[email protected]",
m_subject = "Testing",
m_text = "Hey, this is the testing email.";
public Main()
Properties props = new Properties();
props.put("mail.smtp.user", d_email);
props.put("mail.smtp.host", d_host);
props.put("mail.smtp.port", d_port);
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.auth", "true");
//props.put("mail.smtp.debug", "true");
props.put("mail.smtp.socketFactory.port", d_port);
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");
SecurityManager security = System.getSecurityManager();
try
Authenticator auth = new SMTPAuthenticator();
Session session = Session.getInstance(props, auth);
//session.setDebug(true);
MimeMessage msg = new MimeMessage(session);
msg.setText(m_text);
msg.setSubject(m_subject);
msg.setFrom(new InternetAddress(d_email));
msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
Transport.send(msg);
catch (Exception mex)
mex.printStackTrace();
public static void main(String[] args)
Main blah = new Main();
private class SMTPAuthenticator extends javax.mail.Authenticator
public PasswordAuthentication getPasswordAuthentication()
return new PasswordAuthentication(d_email, d_password);
}

yes that not a my password ...but the following erroer is occured ...
run-main:
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:319)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:118)
at javax.mail.Transport.send0(Transport.java:188)
at javax.mail.Transport.send(Transport.java:118)
at Main.<init>(Main.java:41)
at Main.main(Main.java:51)
BUILD SUCCESSFUL (total time: 3 seconds)
I am using the netbeand 5.5

Similar Messages

  • I bought CS6 creative suite. As of now i need to work each application in separate separate system. Can any one please help me how to solve this problem.

    I bought CS6 creative suite. As of now i need to work each application in separate separate system. Can any one please help me how to solve this problem.
    I saw the below quote on Adobe forum
    "You may install software on up to two computers. These two computers can be Windows, Mac OS, or one each."
    If i install each application in single single system the system count is more than two. In this case, are we have any license issue? Please advice how the problem will solve?
    If possible please send the advise to my mail id: <Removed by Moderator>
    Thanks
    Uvaraj S

    I already answered that.  If you purchased a Suite then you can only install and activate it on two machines.  Even if you only insdtall one of the applications of that suite, it counts as one activation of the suite.  You cannot take the six or seven different applications that might be in a suite and install and activate them in six or seven different machines... only two machines.
    If your scenario will allow for it, one thing you can do is install the programs on all the different machines and only activate two of the machines at any given time.  If you need to activate a program on a third machine then you need to deactivate on one of the currently activate machines first so that you have an open activation to use again.  I do not remember if there is a limit to the total number of activations you can process for the life of the software.

  • After I upgraded to ios6 , my iPad gmail was something wrong because it always hang and switch off the App automatically . It is very irritating . Please let me know how to solve this problem because I have to read my email everyday . Thanks .

    After I upgraded to ios6 , my iPad gmail was something wrong because it always hang and switch off the App automatically . It is very irritating . Please let me know how to solve this problem because I have to read my email everyday . Thanks .

    Double tap Home button, delete Mail from multitask-bar.
    Do a reset (Hold Sleep/Wake and Home buttons about 10 secs or more till Apple logo appears, ignore the Slide to Power Off that appears)
    Note: You will not lose any data.

  • I recieve SMS and i hear established melody and I do't hear the person on all over SMS. How to solve this problem?

    Problem with an incoming message. For example, during my conversation the second line receives a call, I hear the sound in dynamics such as "piiiip piiiip," but when in this situation I recieve SMS and i hear established melody and I do't hear the person on all over SMS. How to solve this problem? Perhaps someone tell me? save in advance

    Not Charge
    - See:     
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    - Try another cable. The cable for 5G iPod (lightning connector) seems to be more prone to failure than the older cable.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar

  • Hi, when ever I'm using 3G, on my Iphone4 sim stops working and Network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem.

    Hi, when ever I'm using 3G, on my Iphone4 sim stops working and network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem. Thanks.

    Photos/videos in the Camera Roll are not synced. Photos/videos in the Camera Roll are not touched with the iTunes sync process. Photos/videos in the Camera Roll can be imported by your computer which is not handled by iTunes. Most importing software includes an option to delete the photos/videos from the Camera Roll after the import process is complete. If is my understanding that some Windows import software supports importing photos from the Camera Roll, but not videos. Regardless, the import software should not delete the photos/videos from the Camera Roll unless you set the app to do so.
    Photos/videos in the Camera Roll are included with your iPhone's backup. If you synced your iPhone with iTunes before the videos on the Camera Roll went missing and you haven't synced your iPhone with iTunes since they went missing, you can try restoring the iPhone with iTunes from the iPhone's backup. Don't sync the iPhone with iTunes again and decline the prompt to update the iPhone's backup after selecting Restore.

  • I Try to open an Indesign document. The message: it is made in a newer version. Go tot CC: Help/Give your Adobe id/Start Indesign again and try to open the document. This doesn't work. How to solve this problem?

    I Try to open an Indesign document. The message: it is made in a newer version. Go tot CC: Help/Give your Adobe id/Start Indesign again and try to open the document. This doesn’t work. How to solve this problem?

    What version are you running?
    What version was it made with?

  • Hello guys..!! I have got my new  iphone 4 2 days ago.The same day it got a problem of auto restart in every 1, to 2 minutes. I updated and restored it many times...but of no use... can any one help me how to solve this problem..!!

    Hello guys..!! I have got my new  iphone 4 2 days ago.The same day it got a problem of auto restart in every 1, to 2 minutes. I updated and restored it many times...but of no use... can any one help me how to solve this problem..!!

    Go to Settings/General/Reset - Erase all content and settings. the connecto to iTunes and restore as a New phone. Do not restore any backup. If the problem persists you have a hardware problem. Take it to Apple for exchange.
    This assumes that the phone is not hacked or jailbroken. If it is you will have to go elsewhere on the internet for help.

  • Iphone 4 is hiting in ios 5.1.1. any one know how to solve this problem??

    iphone 4 is hiting in ios 5.1.1. any one know how to solve this problem??

    This sounds like a hardware problem and should be taken to Apple if the heating / "hiting" becomes disturbing to you. If you feel that your iPhone has a heating / "hiting" problem and needs to be repaired, please contact Apple Support and they can further assist you in having it inspected, repaired, or even replaced. In the past, the overheating of Apple products has been known to cause harmful problems to a few particular users. Please evaluate your situation and take further action if you feel necessary.
    http://www.apple.com/support/contact/

  • I'm using windows 8 on my pc, and i have just downloaded the latest version of itunes, after i upgraded the latest version of itunes, it can't detect my iphone, but my windows/my pc does. Anyone knows how to solve this problem?

    I'm using windows 8 on my pc, and i have just downloaded the latest version of itunes, after i upgraded the latest version of itunes, it can't detect my iphone, but my windows/my pc does. Anyone knows how to solve this problem?

    Hi jstutsman,
    If you are having issues with your iPod nano not being recognized in iTunes after a recent update, you may find the steps and links listed in the following article helpful:
    iPod not appearing in iTunes - Apple Support
    Regards,
    - Brenden

  • I have a problem in my iphone 4 with wi-fi after update to IOS6 please can help my how can solve this problem?

    I have a problem in my iphone 4 with wi-fi after update to IOS6 please can help my how can solve this problem?

    Nope
    One needs to press the home and sleep / wake keys together for the phone to reset
    The other thing I could recommend
    Let the battery run out and the phone completely "die"
    It may take a day or two with it not being used
    Then plug it in to charge and see if there is any change in behavior
    If you cannot get this to work - you may need to bring it to an Apple store

  • When i go to new sms typing their is always show a text, how can solve this problem?

    when i go to new sms typing their is always show a text, how can solve this problem?

    Delete them and then download them from the desired Apple ID. This may require repurchasing paid applications.
    (95675)

  • Hi my iphone 4 is disabled how can solve this problem? help me please

    hi my iphone 4 is disabled how can solve this problem? help me please

    What do you mean by "disabled"? Disabled by entering the wrong passcode? If so, you'll have to force the phone into recovery mode & restore it to get it working again & remove the passcode:
    Turn your phone off, then force it into recovery mode & restore it:
    Leave the USB cable connected to your computer, but NOT your phone, iTunes running, press & hold the home button while connecting the USB cable to your dock connector, continue holding the home button until you see “Connect to iTunes” on the screen. You may now release the home button. iTunes should now display that it has detected your phone in recovery mode, if not quit and reopen iTunes. If you still don’t see the recovery message repeat these steps again. iTunes will give you the option to restore from a backup or set up as new.

  • I have an IMac 10.5.2 from about 5 years ago and recently my flash player stopped responding.  I tried to update my flash player but it tells me I need an updated system to install the player.  Can anyone help me figure out how to solve this problem?

    I have an imac osx 10.5.2 from about five years ago and recently my flash player stopped operating/responding.  Does anyone know if I have to install a new flash player?  I have attempted it several times and it won't let me.  I would appreciate any suggestions on how to solve this problem.  Do I need a new operating system?

    Why have you not updated to 10.5.8?
    You can check here:  http://www.adobe.com/products/flash/about/  to see which version you should install for your Mac and OS. Note that version 10,1,102,64 is the last version available to PPC Mac users*. The latest version,10.3.183.23 or later, is for Intel Macs only running Tiger or Leopard, as Adobe no longer support the PPC platform. Version 11.4.402.265 or later is for Snow Leopard onwards.
    * Unhelpfully, if you want the last version for PPC (G4 or G5) Macs, you need to go here:  http://kb2.adobe.com/cps/142/tn_14266.html  and scroll down to 'Archived Versions/Older Archives'. Flash Player 10.1.102.64 is the one you download. More information here:  http://kb2.adobe.com/cps/838/cpsid_83808.html
    You should first uninstall any previous version of Flash Player, using the uninstaller from here (make sure you use the correct one!):
    http://kb2.adobe.com/cps/909/cpsid_90906.html
    and also that you follow the instructions closely, such as closing ALL applications (including Safari) first before installing. You must also carry out a permission repair after installing anything from Adobe.
    After installing, reboot your Mac and relaunch Safari, then in Safari Preferences/Security enable ‘Allow Plugins’. If you are running 10.6.8 or later:

  • Hello THIS IS RAZA I GOT A MACBOOK PRO I HAVE A PROBLEM. PROBLEM IS how to solve this problem i have uploaded in .... all the time few days later on i face this problem in safari..... anyone can help me please.....thanks Screen Shot 2015-03-21 at 10.

    Hello
    THIS IS RAZA
    I GOT A MACBOOK PRO
    I HAVE A PROBLEM. PROBLEM IS how to solve this problem i have uploaded in .... all the time few days later on i face this problem in safari..... anyone can help me please.....thanks

    This is a scam. Do not phone these people, at best they will charge you for unnecessary 'cleaning' and at worst they will gain access to your Mac and steal your data. You've probably managed to install some 'adware' which is producing this fake warning. 'Adwaremedic' should remove it and is safe to use - please see
    http://www.adwaremedic.com/index.php

  • Why i can not open my itunes how to solve this problem

    i have problem with my itunes version 10.3 but it said the file itunes library it could'nt be read it was created by new version of itunes where i can go to find the library of itunes or how to solve this problem..

    Hello:
    This article may help:
    http://docs.info.apple.com/article.html?path=Mac/10.7/en/mh11399.html
    Are you really running OS X 10.4 or is your profile out of date?
    Barry

Maybe you are looking for

  • How can I make a dropdown box populate with values from other fields?

    I am trying to create a NCAA bracket where they select teams from a dropdown menu. For example, they choose which teams win in game 1 and 2 through a dropdown box. The winner of games 1 and 2 then play each other, so how can I populate the dropbox wi

  • How do I allow pop ups in safari without being asked "block or allow" ?

    I'm assuming that when I turned on the setting in Safari to allow pop-ups, I wouldn't have to tell the browser to allow or block every single pop up after that.  Is there a combination of settings to make allow pop-ups without the additional "block o

  • Oracle 10g  is an auto managed database. Why ?

    Oracle 10g is an auto managed database. Why ? I have read that with 10g version, Oracle database will need very less management, since it can be configured to automanage itself. Sounds not believable. Apart from auto extending tablespaces, what other

  • JDBC log

    We have recently come up on XI 3.0.  I hope this is not too basic of a question, but where can I view the adapter logs??  In 2.0 we would go to http://<host>:8200, click the link for the specific adapter, and from there you could configure the adapte

  • Slideshows on Albums page

    I am wondering if there is a way to get more options when creating a slideshow on the albums page when you put the curser on the box. I want to be able to manipulate the size of the slideshow box more than what I can now on the albums page. I also wa