Properties properties = System.getProperties();
            properties.put("mail.smtp.host","smtp.sina.com.cn");
            properties.put("mail.transport.protocol", "smtp");
            properties.put("mail.smtp.auth","true");
            Session session = Session.getInstance(properties,
                    new Authenticator() {
                protected PasswordAuthentication getPasswordAuthentication() {
                    return new PasswordAuthentication(strUserName,strPassword);
                }
            });
                    try
                    {
                        MimeMessage message = new MimeMessage(session);
                        message.setFrom(new InternetAddress(strMail));
                        InternetAddress[] toadd = InternetAddress.parse(strEmailTo);
                        message.setRecipients(Message.RecipientType.TO,toadd);                        message.setSubject(strSubject,"Shift_JIS");
                        message.setText(strFullMailText,"Shift_JIS");                        Transport transport = session.getTransport();
                        message.saveChanges();
                        transport.send(message,message.getAllRecipients());
                        transport.close();                    }
                    catch (AddressException e)
                    {
                    }
                    catch (SendFailedException e)
                    {
                    }
                    catch (MessagingException e)
                    {
                    }