Java ·¢ËÍ Email
·¢ËÍ email ÐèÒª email.jar activation.jar
-----------------------------------------------
package tao.email;
import java.util.Date;
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;
public class MailSender {
private String smtp = "smtp.qq.com"; // Óʼþ·þÎñÆ÷
private String username = "786792111";
private String password = "xxxxx";
private String from = username+"@qq.com";
EmailAuthenticator auth = new EmailAuthenticator(this.username,this.password);
Properties props = System.getProperties();
{
props.put("mail.smtp.host",smtp);
props.put("mail.smtp.auth", "true");
}
Session session = Session.getDefaultInstance(props,(Authenticator)auth);
Message msg = new MimeMessage(session);
public void sendTo(String to){
try{
msg.setfrom(new InternetAddress(from));
msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
msg.setSubject("Óû§×¢²áÑéÖ¤");
msg.setSentDate(new Date());
 
Ïà¹ØÎĵµ£º
ÏÂÔØµØÖ· ¿ÉÒÔÔÚeclpseÖÐÅܵÄ
Éú²úexcelÓ¦Óãº
package com.lihp.exl;
/**
Ä¿µÄ£ºÌṩÓÉÊý¾Ý¶ÔÏ󼯺ÏÀࣨVector£©Éú³ÉExcel¹¤×÷±íµÄ¹¦ÄÜ
×÷Õߣºlihaipeng
*/
import java.io.*;
import java.util.*;
import java.lang.reflect.Method;
import org.apache.poi.hssf.usermodel.HSSFSheet;
impor ......
Java Web¿ª·¢ÖУ¬ÓÐÐí¶à¹²Í¨µÄÎÊÌ⣬ÊÇ¿ª·¢ÈËÔ±ÔÚ¿ª·¢¹ý³ÌÖÐÒ»¶¨»áÓöµ½µÄ£¬ÐèÒª´¦ÀíµÄÎÊÌ⣺
1. ÂÒÂëÎÊÌâ
ΪºÎ»á³öÏÖÂÒÂëÎÊÌ⣿¼ÈÈ»ÓÐÂÒÂëÎÊÌ⣬¿Ï¶¨ÊÇÓÉÓÚ±àÂëÉèÖõIJ»Ò»Öµ¼Öµġ£ÔÚWeb¿ª·¢
¹ý³ÌÖУ¬Éæ¼°ÒÔÏÂһЩ±àÂëÉèÖ㬿ͻ§¶Ë²ÎÊýµÄ±àÂëÉèÖã¬Web·þÎñÆ÷µÄ±àÂëÉèÖ㬷þÎñÆ÷¶ËÓ¦ÓóÌÐòµÄ±àÂëÉèÖã¬Êý¾Ý¿â ......
¸ú×ÅÀÏʦѧjavaÕâô¾ÃÁË£¬¶ÔÕâÖÖÕâ¸öÓïÑÔСϺÊÇÕâÑùÀí½âµÄ£¬ËüÊǸöÖÖÉϳ˵ÄÎä¹¦ÃØ¼® £¨µ±È»°üÀ¨ÆäËûÓïÑÔ£©£¬Ñ§Ï°Ê±ºÜÈÝÒ××ß»ðÈëħ£¡ÓкܶàjavaµÄ¸ßÊÖ£¬ºÜÀ÷º¦£¡ºÎÒÔ¼ûµÃ£¬ÄãҪʲôʲô¶¼ÄܸøÄãд³öÀ´¶øÇÒÓÃʱ·Ç³£µÄÉÙ£¬Ð¡Ïº²»²Å£¬Ò»Ö±ÒÔÀ´ÐÅ·îÕâÑù²Å½Ð³ÌÐòÔ±£¡ÆäʵСϺÀí½â´í¿©£¬´íÔÚ°ÜÁË£¡Íæ¼¼Êõ£¬Ö»Òª¿¼Ò»¿¼±ãÖªµÀÄãµÄ訮 ......
¶ÔÏó¾ßÓÐ״̬,ÐÐΪ,±êʶ.¶ÔÏóµÄÎå¸ö»ù±¾ÌØÐÔ:
ÍòÎï½Ô¶ÔÏó,³éÈ¡´ýÇó½âÎÊÌâµÄÈκθÅÄ¹¹¼þ,½«Æä±íʾΪ³ÌÐòÖеĶÔÏó
³ÌÐòÊǶÔÏóµÄ¼¯ºÏ,ËûÃÇͨ¹ý·¢ËÍÏûÏ¢À´¸æÖª±Ë´ËËùÒª×öµÄ
ÿ¸ö¶ÔÏó¶¼ÓÐ×Ô¼ºµÄÓÉÆäËû¶ÔÏóËù¹¹³ÉµÄ´æ´¢,´´½¨°üº¬ËùÓжÔÏóµÄ°üµ ......