记录一下过程。

两种版本第一个demo是纯java文件。一个就可以,是我在网上搜索到的,第二个demo是我在ssh框中中写的jsp页面demo

1.java版本:

 package com.zq.www.mis.action;

 import com.org.momo.javaMail邮件.MailSenderInfo;
import com.org.momo.javaMail邮件.SimpleMailSender; public class mail {
public static void main(String[] args) throws InterruptedException{
//这个类主要是设置邮件
MailSenderInfo mailInfo = new MailSenderInfo();
mailInfo.setMailServerHost("smtp.163.com");
mailInfo.setMailServerPort("25"); // true则需要身份认证,将账号和密码设置到 密码验证器 中
mailInfo.setValidate(true);
mailInfo.setUserName("stzengzhiwei@163.com");
mailInfo.setPassword("ffcuqqbhgkzasaek");//您的邮箱密码
//mailInfo.setPassword("wei.44944");//您的邮箱密码 // 创建邮件发送者和接受者的地址
mailInfo.setFromAddress("stzengzhiwei@163.com");
mailInfo.setToAddress("stzengzhiwei@126.com"); //设置主题和内容
mailInfo.setSubject("测试标题:曾志伟我想你了");
mailInfo.setContent("测试内容:曾经有一段真挚的感情摆在我的面前我没有珍惜知道失去了才追悔莫及!"); //发送邮件
SimpleMailSender sms = new SimpleMailSender();
int i=0 ;
while(sms.sendTextMail(mailInfo))//发送文体格式
{
System.out.println("发送第"+(i+1)+"封邮件成功!") ;
new Thread().sleep(1) ;
i++ ;
if(i>=5) break ;
}
//sms.sendHtmlMail(mailInfo);//发送html格式
} }

2.ssh中的版本需要两个页面

action

 package com.zq.www.mis.action;

 import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results; import com.alibaba.fastjson.JSON;
import com.org.momo.javaMail邮件.MailSenderInfo;
import com.org.momo.javaMail邮件.SimpleMailSender;
import com.zq.www.common.BaseAction;
//struts注解
@SuppressWarnings("serial") @Results( {
@Result(name = "tz", location = "/BacksAdmin/mail/result.jsp") })
public class MailAction extends BaseAction
{
private String sendto;
private String title;
private String content; public String send() throws Exception
{ System.out.println("a="+sendto);
System.out.println("b="+title);
System.out.println("c="+content);
//这个类主要是设置邮件
MailSenderInfo mailInfo = new MailSenderInfo();
mailInfo.setMailServerHost("smtp.163.com");
mailInfo.setMailServerPort("25"); // true则需要身份认证,将账号和密码设置到 密码验证器 中
mailInfo.setValidate(true);
mailInfo.setUserName("stzengzhiwei@163.com");
mailInfo.setPassword("ssssssssk");//您的邮箱密码
//mailInfo.setPassword("wei.44944");//您的邮箱密码 // 创建邮件发送者和接受者的地址
mailInfo.setFromAddress("stzengzhiwei@163.com");
mailInfo.setToAddress(sendto); //设置主题和内容
mailInfo.setSubject("测试标题:"+title);
mailInfo.setContent("测试内容:"+content); //发送邮件
SimpleMailSender sms = new SimpleMailSender();
int i=0 ;
while(sms.sendTextMail(mailInfo))//发送文体格式
{
System.out.println("发送第"+(i+1)+"封邮件成功!") ;
new Thread().sleep(1) ;
i++ ;
if(i>=5) break ;
}
//sms.sendHtmlMail(mailInfo);//发送html格式 //this.getResponse().getWriter().write(JSON.toJSONString("success"));
return "tz"; } public String getSendto() {
return sendto;
} public void setSendto(String sendto) {
this.sendto = sendto;
} public String getTitle() {
return title;
} public void setTitle(String title) {
this.title = title;
} public String getContent() {
return content;
} public void setContent(String content) {
this.content = content;
} }

jsp

 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta charset="utf-8" />
<title>AirPlane| searcPlane</title>
<!-- ================== BEGIN BASE CSS STYLE ================== -->
<link href="http://fonts.useso.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet">
<link href="<%=basePath %>/BacksAdmin/assets/plugins/jquery-ui/themes/base/minified/jquery-ui.min.css" rel="stylesheet" />
<link href="<%=basePath %>/BacksAdmin/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="<%=basePath %>/BacksAdmin/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<link href="<%=basePath %>/BacksAdmin/assets/css/animate.min.css" rel="stylesheet" />
<link href="<%=basePath %>/BacksAdmin/assets/css/style.min.css" rel="stylesheet" />
<link href="<%=basePath %>/BacksAdmin/assets/css/style-responsive.min.css" rel="stylesheet" />
<link href="<%=basePath %>/BacksAdmin/assets/css/theme/default.css" rel="stylesheet" id="theme" />
<!-- ================== END BASE CSS STYLE ================== -->
<!-- ================== BEGIN PAGE LEVEL CSS STYLE ================== -->
<link href="<%=basePath %>/BacksAdmin/assets/plugins/jquery-jvectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" />
<link href="<%=basePath %>/BacksAdmin/assets/plugins/bootstrap-calendar/css/bootstrap_calendar.css" rel="stylesheet" />
<link href="<%=basePath %>/BacksAdmin/assets/plugins/gritter/css/jquery.gritter.css" rel="stylesheet" />
<link href="<%=basePath %>/BacksAdmin/assets/plugins/morris/morris.css" rel="stylesheet" /> <!-- ================== END PAGE LEVEL CSS STYLE ================== -->
<!-- ================== BEGIN BASE JS ================== --> <script src="<%=basePath %>/BacksAdmin/assets/plugins/pace/pace.min.js"></script> <!-- ================== END BASE JS ================== -->
</head>
<body>
<!-- begin #page-loader -->
<div id="page-loader" class="fade in">
<span class="spinner"></span>
</div>
<!-- end #page-loader -->
<!-- begin #page-container -->
<div id="page-container" class="fade page-sidebar-fixed page-header-fixed">
<!-- begin #header -->
<div id="header" class="header navbar navbar-default navbar-fixed-top">
<!-- begin container-fluid -->
<div class="container-fluid">
<!-- begin mobile sidebar expand / collapse button -->
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><span class="navbar-logo"></span>Color Admin</a>
<button type="button" class="navbar-toggle" data-click="sidebar-toggled">
<span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar">
</span>
</button>
</div>
<!-- end mobile sidebar expand / collapse button -->
<!-- begin header navigation right -->
<ul class="nav navbar-nav navbar-right">
<li>
<form class="navbar-form full-width">
<div class="form-group">
<input type="text" class="form-control" placeholder="Enter keyword" />
<button type="submit" class="btn btn-search">
<i class="fa fa-search"></i>
</button>
</div>
</form>
</li>
<li class="dropdown"><a href="javascript:;" data-toggle="dropdown" class="dropdown-toggle f-s-14">
<i class="fa fa-bell-o"></i><span class="label">5</span> </a>
<ul class="dropdown-menu media-list pull-right animated fadeInDown">
<li class="dropdown-header">Notifications (5)</li>
<li class="media"><a href="javascript:;">
<div class="media-left">
<i class="fa fa-bug media-object bg-red"></i>
</div>
<div class="media-body">
<h6 class="media-heading">
Server Error Reports</h6>
<div class="text-muted f-s-11">
3 minutes ago</div>
</div>
</a></li>
<li class="media"><a href="javascript:;">
<div class="media-left">
<img src="<%=basePath %>/BacksAdmin/assets/img/user-1.jpg" class="media-object" alt="" /></div>
<div class="media-body">
<h6 class="media-heading">
John Smith</h6>
<p>
Quisque pulvinar tellus sit amet sem scelerisque tincidunt.</p>
<div class="text-muted f-s-11">
25 minutes ago</div>
</div>
</a></li>
<li class="media"><a href="javascript:;">
<div class="media-left">
<img src="<%=basePath %>/BacksAdmin/assets/img/user-2.jpg" class="media-object" alt="" /></div>
<div class="media-body">
<h6 class="media-heading">
Olivia</h6>
<p>
Quisque pulvinar tellus sit amet sem scelerisque tincidunt.</p>
<div class="text-muted f-s-11">
35 minutes ago</div>
</div>
</a></li>
<li class="media"><a href="javascript:;">
<div class="media-left">
<i class="fa fa-plus media-object bg-green"></i>
</div>
<div class="media-body">
<h6 class="media-heading">
New User Registered</h6>
<div class="text-muted f-s-11">
1 hour ago</div>
</div>
</a></li>
<li class="media"><a href="javascript:;">
<div class="media-left">
<i class="fa fa-envelope media-object bg-blue"></i>
</div>
<div class="media-body">
<h6 class="media-heading">
New Email From John</h6>
<div class="text-muted f-s-11">
2 hour ago</div>
</div>
</a></li>
<li class="dropdown-footer text-center"><a href="javascript:;">View more</a> </li>
</ul>
</li>
<li class="dropdown navbar-user"><a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
<img src="<%=basePath %>/BacksAdmin/assets/img/user-13.jpg" alt="" />
<span class="hidden-xs">Adam Schwartz</span> <b class="caret"></b></a>
<ul class="dropdown-menu animated fadeInLeft">
<li class="arrow"></li>
<li><a href="javascript:;">Edit Profile</a></li>
<li><a href="javascript:;"><span class="badge badge-danger pull-right">2</span> Inbox</a></li>
<li><a href="javascript:;">Calendar</a></li>
<li><a href="javascript:;">Setting</a></li>
<li class="divider"></li>
<li><a href="javascript:;">Log Out</a></li>
</ul>
</li>
</ul>
<!-- end header navigation right -->
</div>
<!-- end container-fluid -->
</div>
<!-- end #header -->
<!-- begin #sidebar -->
<div id="sidebar" class="sidebar">
<!-- begin sidebar scrollbar -->
<div data-scrollbar="true" data-height="100%">
<!-- begin sidebar user -->
<ul class="nav">
<li class="nav-profile">
<div class="image">
<a href="javascript:;"><img src="assets/img/user-13.jpg" alt="" /></a>
</div>
<div class="info">
Sean Ngu
<small>Front end developer</small>
</div>
</li>
</ul>
<!-- end sidebar user -->
<!-- begin sidebar nav -->
<ul class="nav">
<li class="nav-header">导航</li>
<li class="has-sub">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-home"></i>
<span>首页</span>
</a>
<ul class="sub-menu"> <li class="active"><a href="<%=basePath%>/BacksAdmin/index.jsp">主控面板</a></li> </ul>
</li>
<li class="has-sub active">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-file-o"></i>
<span >购票管理</span>
</a>
<ul class="sub-menu">
<li class="active"><a href="<%=basePath%>/BacksAdmin/flight/chapiao.jsp">在线购票</a></li>
<li><a href="<%=basePath%>/BacksAdmin/order_approve/list.jsp">订单审核</a></li>
</ul>
</li>
<li class="has-sub">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-newspaper-o"></i>
<span>航空公司管理</span>
</a>
<ul class="sub-menu">
<li>
<a href="<%=basePath%>/BacksAdmin/aircompany/search.jsp">查询</a>
</li>
<li class="active">
<a href="<%=basePath%>/BacksAdmin/aircompany/add.jsp">添加</a>
</li>
</ul>
</li>
<li class="has-sub">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-user"></i>
<span>人员管理</span>
</a>
<ul class="sub-menu">
<li ><a href="employee!A.action">录入员工信息</a></li>
<li><a href="employee!Find.action">删除员工信息</a></li>
<li ><a href="employee!Find1.action">修改员工信息</a></li>
<li><a href="employee!Find2.action">查询员工信息</a></li>
</ul>
</li>
<li class="has-sub">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-calendar-o"></i>
<span>折扣管理</span>
</a>
<ul class="sub-menu">
<li ><a href="<%=basePath%>/BacksAdmin/discount/calendar1.jsp">折扣管理</a></li>
<li><a href="#">自定义添加内容</a></li>
</ul>
</li>
<li class="has-sub">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-paper-plane-o"></i>
<span>航班管理</span>
</a> <ul class="sub-menu">
<li ><a href="line-manager!queryLineToday.action">查询航班</a></li> </ul>
</li>
<li class="has-sub">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="glyphicon glyphicon-plane"></i>
<span>飞机管理</span>
</a>
<ul class="sub-menu">
<li><a
href="plane!czfj.action">查询</a></li>
<li><a href="<%=basePath %>BacksAdmin/plane/add.jsp">添加</a></li>
</ul>
</li>
<li class="has-sub ">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-users"></i>
<span>客户管理</span>
</a>
<ul class="sub-menu">
<li ><a href="<%=basePath %>/BacksAdmin/ordermd/tuser!show.action">查询</a></li>
<li class="active"><a href="<%=basePath %>/BacksAdmin/ordermd/Tuser1.jsp">添加</a></li>
</ul>
</li>
<li class="has-sub">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-list-alt"></i>
<span>季度报表</span>
</a>
<ul class="sub-menu">
<li ><a href="#">自定义添加内容</a></li>
<li><a href="#">自定义添加内容</a></li>
</ul>
</li>
<li class="has-sub">
<a href="javascript:;">
<span class="badge pull-right">99</span>
<i class="fa fa-inbox"></i>
<span>邮箱</span>
</a>
<ul class="sub-menu">
<li><a href="email_inbox.html">Inbox v1</a></li>
<li><a href="email_inbox_v2.html">Inbox v2</a></li>
<li><a href="email_compose.html">Compose</a></li>
<li><a href="email_detail.html">Detail</a></li>
</ul>
</li> <!-- begin sidebar minify button -->
<li><a href="javascript:;" class="sidebar-minify-btn" data-click="sidebar-minify"><i class="fa fa-angle-double-left"></i></a></li>
<!-- end sidebar minify button -->
</ul>
<!-- end sidebar nav -->
</div>
<!-- end sidebar scrollbar -->
</div>
<div class="sidebar-bg">
</div>
<!-- end #sidebar -->
<!-- begin #content -->
<div id="content" class="content">
<!-- begin breadcrumb -->
<ol class="breadcrumb pull-right">
<li><a href="javascript:;">主页</a></li>
<li><a href="javascript:;">查票管理</a></li>
<li class="active">查询</li>
</ol>
<!-- end breadcrumb -->
<!-- begin page-header -->
<h1 class="page-header">
查票管理 <small>以下是所有需要填写的信息...</small></h1>
<!-- end page-header -->
<div class="panel panel-inverse">
<div class="panel-heading">
<div class="panel-heading-btn">
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-repeat"></i></a>
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger" data-click="panel-remove"><i class="fa fa-times"></i></a>
</div>
<h4 class="panel-title">订票查询</h4>
</div>
<div class="alert alert-info fade in">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">&times;</span>
</button> <label class="control-label" for="input01" style="font-weight:bold">
远方,从holy airport开始
</label> </div>
<div class="panel-body">
<!-- begin row -->
<form method="post" action="mail!send.action"> 输入你要发送的邮箱号码:<input type="text" name="sendto">
输入邮件标题<input type="text" name="title">
输入邮件内容<textarea name="content" id="" cols="30" rows="10"></textarea>
<button id="a123" type="submit">send</button> </form>
</div>
<div id="message">
666
</div>
</div>
</div>
<!-- end row --> <!-- begin row --> <!-- end row -->
<!-- begin row --> <!-- end row -->
</div>
<!-- end #content -->
<!-- begin theme-panel -->
<div class="theme-panel">
<a href="javascript:;" data-click="theme-panel-expand" class="theme-collapse-btn"><i
class="fa fa-cog"></i></a>
<div class="theme-panel-content">
<h5 class="m-t-0">
Color Theme</h5>
<ul class="theme-list clearfix">
<li class="active"><a href="javascript:;" class="bg-green" data-theme="default" data-click="theme-selector"
data-toggle="tooltip" data-trigger="hover" data-container="body" data-title="Default">
&nbsp;</a></li>
<li><a href="javascript:;" class="bg-red" data-theme="red" data-click="theme-selector"
data-toggle="tooltip" data-trigger="hover" data-container="body" data-title="Red">
&nbsp;</a></li>
<li><a href="javascript:;" class="bg-blue" data-theme="blue" data-click="theme-selector"
data-toggle="tooltip" data-trigger="hover" data-container="body" data-title="Blue">
&nbsp;</a></li>
<li><a href="javascript:;" class="bg-purple" data-theme="purple" data-click="theme-selector"
data-toggle="tooltip" data-trigger="hover" data-container="body" data-title="Purple">
&nbsp;</a></li>
<li><a href="javascript:;" class="bg-orange" data-theme="orange" data-click="theme-selector"
data-toggle="tooltip" data-trigger="hover" data-container="body" data-title="Orange">
&nbsp;</a></li>
<li><a href="javascript:;" class="bg-black" data-theme="black" data-click="theme-selector"
data-toggle="tooltip" data-trigger="hover" data-container="body" data-title="Black">
&nbsp;</a></li>
</ul>
<div class="divider">
</div>
<div class="row m-t-10">
<div class="col-md-5 control-label double-line">
Header Styling</div>
<div class="col-md-7">
<select name="header-styling" class="form-control input-sm">
<option value="1">default</option>
<option value="2">inverse</option>
</select>
</div>
</div>
<div class="row m-t-10">
<div class="col-md-5 control-label">
Header</div>
<div class="col-md-7">
<select name="header-fixed" class="form-control input-sm">
<option value="1">fixed</option>
<option value="2">default</option>
</select>
</div>
</div>
<div class="row m-t-10">
<div class="col-md-5 control-label double-line">
Sidebar Styling</div>
<div class="col-md-7">
<select name="sidebar-styling" class="form-control input-sm">
<option value="1">default</option>
<option value="2">grid</option>
</select>
</div>
</div>
<div class="row m-t-10">
<div class="col-md-5 control-label">
Sidebar</div>
<div class="col-md-7">
<select name="sidebar-fixed" class="form-control input-sm">
<option value="1">fixed</option>
<option value="2">default</option>
</select>
</div>
</div>
<div class="row m-t-10">
<div class="col-md-5 control-label double-line">
Sidebar Gradient</div>
<div class="col-md-7">
<select name="content-gradient" class="form-control input-sm">
<option value="1">disabled</option>
<option value="2">enabled</option>
</select>
</div>
</div>
<div class="row m-t-10">
<div class="col-md-5 control-label double-line">
Content Styling</div>
<div class="col-md-7">
<select name="content-styling" class="form-control input-sm">
<option value="1">default</option>
<option value="2">black</option>
</select>
</div>
</div>
<div class="row m-t-10">
<div class="col-md-12">
<a href="#" class="btn btn-inverse btn-block btn-sm" data-click="reset-local-storage">
<i class="fa fa-refresh m-r-3"></i>Reset Local Storage</a>
</div>
</div>
</div>
</div>
<!-- end theme-panel -->
<!-- begin scroll to top btn -->
<a href="javascript:;" class="btn btn-icon btn-circle btn-success btn-scroll-to-top fade"
data-click="scroll-top"><i class="fa fa-angle-up"></i></a>
<!-- end scroll to top btn -->
</div>
<!-- end page container -->
<!-- ================== BEGIN BASE JS ================== --> <script src="<%=basePath %>/BacksAdmin/assets/plugins/jquery/jquery-1.9.1.min.js"></script> <script src="<%=basePath %>/BacksAdmin/assets/plugins/jquery/jquery-migrate-1.1.0.min.js"></script> <script src="<%=basePath %>/BacksAdmin/assets/plugins/jquery-ui/ui/minified/jquery-ui.min.js"></script> <script src="<%=basePath %>/BacksAdmin/assets/plugins/bootstrap/js/bootstrap.min.js"></script> <!--[if lt IE 9]>
<script src="assets/crossbrowserjs/html5shiv.js"></script>
<script src="assets/crossbrowserjs/respond.min.js"></script>
<script src="assets/crossbrowserjs/excanvas.min.js"></script>
<![endif]--> <script src="<%=basePath %>/BacksAdmin/assets/plugins/slimscroll/jquery.slimscroll.min.js"></script> <script src="<%=basePath %>/BacksAdmin/assets/plugins/jquery-cookie/jquery.cookie.js"></script> <!-- ================== END BASE JS ================== -->
<!-- ================== BEGIN PAGE LEVEL JS ================== --> <script src="<%=basePath %>/BacksAdmin/assets/plugins/morris/raphael.min.js"></script> <script src="<%=basePath %>/BacksAdmin/assets/plugins/morris/morris.js"></script> <script src="<%=basePath %>/BacksAdmin/assets/plugins/jquery-jvectormap/jquery-jvectormap-1.2.2.min.js"></script> <script src="<%=basePath %>/BacksAdmin/assets/plugins/jquery-jvectormap/jquery-jvectormap-world-merc-en.js"></script> <script src="<%=basePath %>/BacksAdmin/assets/plugins/bootstrap-calendar/js/bootstrap_calendar.min.js"></script> <script src="<%=basePath %>/BacksAdmin/assets/plugins/gritter/js/jquery.gritter.js"></script> <script src="<%=basePath %>/BacksAdmin/assets/js/dashboard-v2.min.js"></script> <script src="<%=basePath %>/BacksAdmin/assets/js/apps.min.js"></script> <!-- ================== END PAGE LEVEL JS ================== --> <script>
$(document).ready(function() {
App.init();
DashboardV2.init();
});
</script> </body>
</html>

实现的过程如下:

1.引出我给的jar包,是网上有人写好的,我直接调用了。有两个包

2.在javaee.jar包中----》javax文件夹---》-mail文件夹删除,我的地址是:C:\Program Files\Genuitec\Common\plugins\com.genuitec.eclipse.j2eedt.core_8.5.0.me201003231033\data\libraryset\EE_5

3.写好上面的我给的代码。就可以运行了

备注:难点是什么:》

jar包在这个链接中:百度云下载

昨天做了一个使用javamail发送文件的demo的更多相关文章

  1. Django中数据传输编码格式、ajax发送json数据、ajax发送文件、django序列化组件、ajax结合sweetalert做二次弹窗、批量增加数据

    前后端传输数据的编码格式(contentType) 提交post请求的两种方式: form表单 ajax请求 前后端传输数据的编码格式 urlencoded formdata(form表单里的) ja ...

  2. {网络编程}和{多线程}应用:基于TCP协议【实现多个客户端发送文件给一个服务器端】--练习

    要求: 实现多个客户端发送文件给一个服务器端 提示:多个人创建客户端发送文件,服务端循环接收socket,从socket中获取文件 说明:这里我们只要建立一个服务端就可以了,然后让多台电脑使用客户端给 ...

  3. 从0开始做一个的Vue图片/ 文件选择(上传)组件[基础向]

    原文:http://blog.csdn.net/sinat_17775997/article/details/58585142 之前用Vue做了一个基础的组件 vue-img-inputer ,下面就 ...

  4. JavaMail发送和接收邮件API(详解)

    一.JavaMail概述: JavaMail是由Sun定义的一套收发电子邮件的API,不同的厂商可以提供自己的实现类.但它并没有包含在JDK中,而是作为JavaEE的一部分. 厂商所提供的JavaMa ...

  5. JavaMail发送和接收邮件

    一.JavaMail概述:        JavaMail是由Sun定义的一套收发电子邮件的API,不同的厂商可以提供自己的实现类.但它并没有包含在JDK中,而是作为JavaEE的一部分. 厂商所提供 ...

  6. 动手做第一个Chrome插件

    Chrome插件是令人惊讶的简单,一旦你弄懂它的工作和实现原理.它是由一部分HTML,一部分Js,然后混合了一个叫做manifest.json的Json文件组合而成的整体.这意味着你可以使用你最擅长的 ...

  7. 【Mail】JavaMail发送带附件的邮件(二)

    上一篇讲了使用JavaMail发送普通邮件([Mail]JavaMail介绍及发送邮件(一)),本例讲发送复杂的邮件(带有附件的邮件) 生成一封复杂的邮件 新建一个JavaWeb的Maven工程,引入 ...

  8. ASP.NET MVC:通过 FileResult 向 浏览器 发送文件

    在 Controller 中我们可以使用 FileResult 向客户端发送文件. FileResult FileResult 是一个抽象类,继承自 ActionResult.在 System.Web ...

  9. xmpp发送文件

    xmpp 文件传输协议: XEP-0096: SI File Transfer:文件传输流初始化协议 XEP-0065: SOCKS5 Bytestreams:带外socks5代理字节流传输协议 XE ...

随机推荐

  1. JavaScript的组成—ECMAScript、BOM和DOM

      JavaScript 是一种基于 ECMAScript 规范的脚本语言,并在此基础上进行了自己的封装.ECMAScript 不是一种编程语言,仅仅是一种脚本语言规范,由欧洲计算机协会制定和发布,任 ...

  2. 转:misc_register、 register_chrdev 的区别总结

    杂项设备(misc device) 杂项设备也是在嵌入式系统中用得比较多的一种设备驱动.在 Linux 内核的include/linux目录下有Miscdevice.h文件,要把自己定义的misc d ...

  3. linux 发布 qt(更新ld命令的路径依赖)

    PATH 错误解决error while loading shared libraries: libXXX.so.X: cannot open shared object file: No such ...

  4. Struts2 权限验证

    之前的Struts2项目通过再Sitemesh的母版页中使用Struts的if标签进行了session判断,使得未登录的用户不能看到页面,但是这 种现仅仅在view层进行,如果未登录用户直接在地址栏输 ...

  5. 最近 弄了一个 discuz 7.2,管理员发帖 会出现 很多错误,解决 办法 在别的帖子中找到了

    公司弄了一个网站,是php 的 还要有 论坛,然后配置论坛配置 了 好几天,然后好不容易配置上了,发现以管理员 发帖 的时候, 页面就会出现 各种错误,各种 警告 解决办法 是,在bbs  文件夹 里 ...

  6. HDOJ(HDU) 2143 box(简单的多次判断-用的卫条件)

    Problem Description One day, winnie received a box and a letter. In the letter, there are three inte ...

  7. Apache-Tika解析JPEG文档

    通常在使用爬虫时,爬取到网上的文章都是各式各样的格式处理起来比较麻烦,这里我们使用Apache-Tika来处理JPEG格式的图片,如下: package com.mengyao.tika.app; i ...

  8. @property中有哪些属性关键字?/ @property 后面可以有哪些修饰符?

    出题者简介: 孙源(sunnyxx),目前就职于百度 整理者简介:陈奕龙(子循),目前就职于滴滴出行. 转载者:豆电雨(starain)微信:doudianyu 属性可以拥有的特质分为四类: 原子性- ...

  9. 谈"http get和post的区别"

    --以下内容如有各种问题,烦请指出,谢谢各位^_^-- 最基本的Java程序员面试题都有这个题 --http get和post的区别? 不少人大学还没毕业就知道,就算不知道也会去搜,我记得我快毕业那会 ...

  10. today's learning of english 2

    1..fumbling    缓慢 笨拙的 2.dancing with impatience in the chekout line sighed exasperation        在安全线外 ...