---
title: "Struts2 + Spring 实现邮件发送"
author: "mywebcode"
date: "2010-07-02T12:03:00Z"
tags: []
slug: "struts2-spring"
draft: false
lastmod: "2013-05-08T10:38:59Z"
id: 1863307
url: "https://mywebcode.iteye.com/blog/1863307"
---

需要struts和spring的框架外，还需要mail.jar,activation.jar.

javamail: [http://java.sun.com/products/javamail/downloads/index.html](http://java.sun.com/products/javamail/downloads/index.html) ，其中包括mail.jar和文档

Activation.jar : [http://java.sun.com/products/javabeans/jaf/downloads/index.html](http://java.sun.com/products/javabeans/jaf/downloads/index.html) ,其中包括Activation.jar

1\) 首先在applicationContext.xml文件中配置bean

2)实现发送邮件java类代码