当前位置:首页 » 服务器技术
开发技术指南» 文章正文
    引言: public class MailSender { publ
 

 

 ·tomcat的安全域(一)    »显示摘要«
    摘要:安全域是tomcat的内置功能,在org.apache.catalina.realm接口中申明了一组用户名、口令及所有关联角色 内存域 memoryrealmjdbc域 jdbcrealm数据源域 datasourcerealmjndi域 jndirealm 在conf/server.xml中配置在你的应用的<context......>下面<realm classname="org.apache.catalina.realm.......
 ·linux下的c 编程------curses 库     »显示摘要«
    摘要:#include <unistd.h> #include <stdlib.h> #include <curses.h> int main() { initscr(); move(5,15); printw("%s","hello world!"); refresh(); sleep(4); endwin(); exit(exit_success); } ......


在Java中发送邮件的角本

package com.asql.base;

import java.util.*; 【相关文章:面向对象的asp编程之四--一些常用的函

【扩展阅读:SpringFramework(6)

import javax.mail.*; 【扩展信息:模式概念(The pattern con

import javax.mail.internet.*;

import javax.activation.*;

public class mailsender {

  public final static boolean sendmail(loadlog sendlog,string smtphost,string mailfrom,

  boolean mailauth,string mailuser,string mailpassword,

  string mailto,string mailcc,string mailsubject,

  string mailmessage,string mailattach)

 {

 mimemessage mimemsg;

 mimemultipart mp;       

 session session;    

 string sep[]={";"};

 properties props=new java.util.properties();   

 int i;

 props.put("mail.smtp.host",smtphost);

 try{

      session = session.getdefaultinstance(props,null);

      mimemsg = new mimemessage(session);

      mp = new mimemultipart();

      if(mailauth)

       props.put("mail.smtp.auth","true");

        else

         props.put("mail.smtp.auth","false");

      if (sendlog!=null)

  sendlog.println("mail host address: "+smtphost);

 }

 catch(exception e)

 {


...   下一页
 ·linux下的c 编程------dir scan     »显示摘要«
    摘要:#include <unistd.h> #include <stdlib.h> #include <dirent.h> #include <sys/stat.h> #include <string.h> #include <stdio.h> void printdir(char *dir,int depth) { dir *dp; struct dirent *entry; struc......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE