sir, I need a source code to understand the working of java mail.plz help me. Reply so on.
Please visit the following links:
Java Mail API is now open source and you can download the source code and read. If you want to understand the working of Java Mail download the source code from here and learn the coding logic behind Java Mail.
You can even compile the source code yourself.