Java官方支持邮件开发,Javax-mail

jdk中默认没有,需要另外下载

apache的基于Javax-mail开发了commons-mail,更加简单高效,推荐使用

一、电子邮件接收和发送协议

二、Apache-James邮件服务器

1.自己搭建

1)将压缩包解压到非中文无空格路径

2)解决jar包冲突

3)操作一些命令设置服务器

设置服务器的域名,给服务器设置用户名和密码

其实james服务器也是将所有数据存在数据库中,默认自带的

可以让james保存到mysql中

mysql驱动的jar放入conf的lib下 James安装目录下的lib是默认的jar,conf中的lib是自定义的jar

打开james-database-template.properties配置,并改名为james-database.properties

#  Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License. # This template file can be used as example for James Server configuration
# DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS # See http://james.apache.org/server/3/config.html for usage # Use derby as default
database.driverClassName=com.mysql.jdbc.Driver
database.url=jdbc:mysql://localhost:3306/email
database.username=root
database.password=root # Supported adapters are:
# DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, SYBASE
vendorAdapter.database=MYSQL # Use streaming for Blobs
# This is only supported on a limited set of databases atm. You should check if its supported by your DB before enable
# it.
#
# See:
# http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_mapping_jpa.html #7.11. LOB Streaming
#
openjpa.streaming=false

邮箱账户@邮箱地址

james需要配置域名(端口默认为9999)

打开一个新的命令窗口
通过DOS窗口,进入到james服务器的bin文件目录, 然后执行下面的DOS命令

创建邮箱的域名
james-cli.bat -h localhost -p 9999 adddomain atguigu.com

创建邮箱用户
james-cli.bat -h localhost -p 9999 adduser test@atguigu.com test
james-cli.bat -h localhost -p 9999 adduser admin@atguigu.com admin

配置foxmail客户端,测试邮件服务器
工具--->账号管理--->新建

三、后台其他

维护资质

资质:证件

t_cert表

分类管理

通过一个矩阵表格,维护每一类账户该上传哪些资质

t_account_type_cert 资质和分类的维护是这个中间表

最新文章

  1. [译]SQL Server分析服务的权限配置
  2. 关于开源授权协议 GPL 和 LGPL
  3. WKWebView 与 UIWebView
  4. 第二回 认识CDN
  5. What is an eigenvector of a covariance matrix?
  6. MySQl数据库必会sql语句加强版
  7. 部署crm项目
  8. centos 7.2 部署并升级gitlab
  9. CM记录-部署cdh5.3.3集群
  10. A - Piece of Cake Kattis - pieceofcake (数学)
  11. MySQL 单条记录长度最大65535
  12. freemark null处理
  13. 【Python】zlib压缩文件
  14. Spring Cache缓存技术的介绍
  15. Android.mk简介
  16. ES6进一步整理
  17. C语言程序设计I—第七周教学
  18. Tomcat CVE-2017-12615 远程上传漏洞复现
  19. Spring Cloud Sleuth 之Greenwich版本全攻略
  20. django允许外部访问

热门文章

  1. array_shift — 将数组开头的单元移出数组
  2. 致第一次安装(yong)小小输入法的你
  3. mysql中limit 和 limit 与 offset 的用法(效果相同,用法不通过)
  4. OC学习篇之---Foundation框架中的NSDirctionary类以及NSMutableDirctionary类
  5. <Jmeter入门不放弃>之<3.两种常见录制脚本的方法>
  6. Linux系统之-介绍,主要特性
  7. CDN技术之--集群服务与负载均衡
  8. css 布局(圣杯、双飞翼)
  9. Java中vector用法整理
  10. LeetCode N皇后 & N皇后 II