Friday, 28 September 2012

Thursday, 27 September 2012

JAVA Program to send an e-mail


The JavaMail API is not part of core Java SE, but an optional extension. In addition, it is required in Java Enterprise Edition. The JavaMail packages can be accessed in two ways:
  • by placing j2ee.jar in the classpath
  • or, by placing both mail.jar and activation.jar in the classpath
The javax.mail API uses a properties file for reading server names and related configuration. These settings will override any system defaults. Alternatively, the configuration can be set directly in code, using the JavaMail API.
In below example, I am sending mail using JavaMail API with GMail SMTP on Port 465.
package  com.mail.tutorial;

import java.util.List;
import java.util.Properties;

import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMessage.RecipientType;

public class SendEmail {
  private  static Properties properties = null;

  static {
    // Load  the  properties file
    try  {
      properties = new Properties();
      InputStream  inputStream  = SendEmail.class.getClassLoader()
    } catch  (Exception e) {
      // Catching  the  exception as null condition  
   // is handled in the methods.

  public static void sendTextMail(String to, String from,  String subject,  
  String body) throws  Exception {

    if (properties.isEmpty()) {
      throw new Exception("Cannot  send mail. Host  data not available.");

    // Authenticate  the  session  with username and password
    Session  session  = Session.getInstance(properties, new Authenticator(){
      protected PasswordAuthentication getPasswordAuthentication()
        return new PasswordAuthentication(

    // Create to and from addresses
    InternetAddress  fromAddress  = new InternetAddress(from);
    InternetAddress  toAddress =  new  InternetAddress(to);

    // Create the message instance 
 // and add the sender, recipient, subject and body.
    Message  msg  = new MimeMessage(session);
    msg.setRecipient(RecipientType.TO, toAddress);
    msg.setContent(body, "text/plain");

    // Finally send  the  email

    // Now,  the  mail would have  reached  the  recipients.  
 // Ask  them to  check their  inbox.
Also you need to set the below properties in a properties file called
# Configuration file for javax.mail 
# If a value for an item is not provided, then 
# system defaults will be used. These items can 
# also be set in code.


# This is your login name and password not required. Instead of 
# hardcoding them in program, I have added here.

You need to download below jars to run the above example 
1. j2ee.jar 
1. mail.jar and activation.jar

Wednesday, 26 September 2012

Freshers & Exp Recruitment For C++ Game Programmer (3d) @ “Gameloft Software” in Hyderabad

Freshers & Exp Recruitment For C++ Game Programmer (3d) @ “Gameloft Software” in Hyderabad
About Company
Name : Gameloft Software Pvt. Ltd
Website : 
Job Details
Education : B.Tech / B.E./ BCA /  B.Sc / MCA / M.Sc / M.Tech
Experience : 0 to 4 Years
Location : Hyderabad
Job Description
C++ Game Programmer (3d) 
- As a member of our engineering team, assist in the full cycle development of a 3D video games for mobile phones from start to finish.
- Day to day responsibilities include development, writing and debugging of code, integrating graphic, sound, and networking components.
- Programming in the relevant languages (C++)
- Knowledge of OpenGL / DirectX/ Win 32
- Knowledgeable in 3D rendering algorithms 
- Experienced in 3D graphics engine programming in games
Skills : C, C++ Programming, Game Programming, Open GL, direct 3d, c++ development
Contact Details

Name : Sowjanya Konda

Friday, 14 September 2012

Google Nexus 7 - The Complete Picture

Google Nexus 7 is the first Nexus-branded tablet and developed by ASUS and Google, it seems to be a bold move. Well, how bold, that you can judge from Google Nexus 7 review on this page. Clearly, Google Nexus 7has the benefit of running plain vanilla flavor Android, creative with manufacturer skins. Earlier, Google was relaxed about releasing Honeycomb to manufacturers but without their branding. But times have changed now.

The Design Aspect

Let us start Google Nexus 7 review with the designing and it looks a bit understated at first look. Although there is nothing here to really gloat about, but one enjoys a lot of function in the design choices.
The buttons and ports on Google Nexus 7 can be seen when looking at the device from the front. The buttons are placed closely and soon you will get pretty much used to them. They make a nice click when pressed. The power/wake button lies on the right side, and you’ll find the micro USB port as well as the 3.5mm jack on the bottom side. With 4 pogo pins on the left side, the entire top-side and the left edge are free.
The back side is completely bare except the speaker. The soft touch plastic almost feels like leather. However, you will definitely miss two features on Google Nexus 7 and one is the rear-facing camera and second, the notification light. The ASUS logo is engraved just above the speaker and the Nexus logo is at the top.


Google Nexus 7 gets its name partly from the 7”, back-lit IPS display in resolution of 1280×800, It is a great screen though not the biggest screen in terms of size and resolution. The higher resolution and relatively small size means that you can enjoy great color reproduction. The device works great as an e-reader and it offers some excellent viewing angles to watch videos. However, using it in sunlight is not a very pleasing experience, as per Google Nexus 7 review. But the screen offers great responses, with easy swipes, accurate touches and presses. The device measures 198.5mm x 120mm x 10.45mm and weighs 340g.


You will find the audio was loud enough in a small quiet room.   You can always fix in some headphones to get rid of the problem of low sound.


With no rear-facing camera in Google Nexus 7, you will find even the camera application missing. But the gadget does have a rear-facing camera, what works just fine enough.

Battery life

You can manage to get well over 3 days of regular use out of Google Nexus 7. Read articles, watch videos, play games, for endless hours. The device managed to conjure up about 11 hours in the video looping test.


Google Nexus 7 brings with it a new version of Android: 4.1, referred to as Jelly Bean that introduces some welcome additions.The homescreen UI is slightly different from other Android tablets and seems closer to the phone UI. The homescreen carries a shortcut bar at the bottom. A familiar pull down can access the notifications that take up only 3’4 of the screen.
What is there
  • a quad-core CPU clocked at 1.2GHz
  • 1GB of RAM
  • 8GB or 16GB of on-device storage
  • WiFi b/g/n and Bluetooth
What is not
  • no SD-slot for expandable storage
  • no 3G variant of the Nexus 7

Conclusion on Google Nexus 7 Review

Google Nexus 7 is without doubt an excellent tablet, available at an outrageously competitive price. It’s clearly one of the top Android tablet. Of course there are some downsides such as no rear-facing camera and no expandable storage. But still the low price makes up for any shortcomings.

Wednesday, 12 September 2012

Software Testing Tutorials << Video Tutorials and FAQ's

Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test.Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include, but are not limited to, the process of executing a program or application with the intent of finding software bugs (errors or other defects).
Software testing can be stated as the process of validating and verifying that a software program/application/product:
  1. meets the requirements that guided its design and development;
  2. works as expected;
  3. can be implemented with the same characteristics.
  4. satisfies the needs of stakeholders (From Wikipedia)
Tutorials From
What Next?


Saturday, 1 September 2012

Cellphones to be less harmful from Saturday

Beginning Saturday, handsets manufactured in India will have to abide by the new radiation norms rolled out by the government.

According to the new cellphone radiation norms, cellphones should emit lower radiation and emissions from cellphone towers also should be cut to to one-tenth of the present level.

The norms will come into force on Sept. 1, according to which cellphones will have a specific absorption rate of 1.6 watts per kg averaged over one gram of human tissue as compared to the earlier limit of 2 watts per kilogram averaged over 10 gram of tissue.

The handsets which are already in the market have been given one year to be phased out while those which the consumers already possess will not be affected by these new norms.

Union telecom minister Kapil Sibal said the norms are more stringent than most countries.

Source : DC