WriteMailAction.java
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:2k
- /*
- * Generated by MyEclipse Struts
- * Template path: templates/java/JavaClass.vtl
- */
- package com.softeem.struts.action;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import org.apache.struts.action.ActionForm;
- import org.apache.struts.action.ActionForward;
- import org.apache.struts.action.ActionMapping;
- import org.apache.struts.actions.DispatchAction;
- import com.softeem.struts.form.WriteForm;
- import com.softeem.webmail.send.SaveMail;
- import com.softeem.webmail.send.SendMail;
- public class WriteMailAction extends DispatchAction {
- public ActionForward send(ActionMapping mapping, ActionForm form,
- HttpServletRequest request, HttpServletResponse response) {
- WriteForm wf = (WriteForm)form;
- String name = "jhw3266204@sina.com";
- String password = "jhw3266204";
- SendMail sm = new SendMail();
- sm.sendmail(wf, name, password);
- return mapping.findForward("sendbox");
- }
- public ActionForward save(ActionMapping mapping, ActionForm form,
- HttpServletRequest request, HttpServletResponse response) {
- WriteForm wf = (WriteForm)form;
- String name = "jhw3266204@sina.com";
- SaveMail sm = new SaveMail();
- sm.save(wf, name);
- return mapping.findForward("sendbox");
- }
- public ActionForward sendsave(ActionMapping mapping, ActionForm form,
- HttpServletRequest request, HttpServletResponse response) {
- WriteForm wf = (WriteForm)form;
- String name = "jhw3266204@sina.com";
- String password = "jhw3266204";
- SendMail sm = new SendMail();
- SaveMail sml = new SaveMail();
- sm.sendmail(wf, name, password);
- sml.save(wf, name);
- return mapping.findForward("sendbox");
- }
-
- }