WriteMailAction.java
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:2k
源码类别:

WEB邮件程序

开发平台:

Java

  1. /*
  2.  * Generated by MyEclipse Struts
  3.  * Template path: templates/java/JavaClass.vtl
  4.  */
  5. package com.softeem.struts.action;
  6. import javax.servlet.http.HttpServletRequest;
  7. import javax.servlet.http.HttpServletResponse;
  8. import org.apache.struts.action.ActionForm;
  9. import org.apache.struts.action.ActionForward;
  10. import org.apache.struts.action.ActionMapping;
  11. import org.apache.struts.actions.DispatchAction;
  12. import com.softeem.struts.form.WriteForm;
  13. import com.softeem.webmail.send.SaveMail;
  14. import com.softeem.webmail.send.SendMail;
  15. public class WriteMailAction extends DispatchAction {
  16. public ActionForward send(ActionMapping mapping, ActionForm form,
  17. HttpServletRequest request, HttpServletResponse response) {
  18. WriteForm wf = (WriteForm)form;
  19. String name = "jhw3266204@sina.com";
  20. String password = "jhw3266204";
  21. SendMail sm = new SendMail();
  22. sm.sendmail(wf, name, password);
  23. return mapping.findForward("sendbox");
  24. }
  25. public ActionForward save(ActionMapping mapping, ActionForm form,
  26. HttpServletRequest request, HttpServletResponse response) {
  27. WriteForm wf = (WriteForm)form;
  28. String name = "jhw3266204@sina.com";
  29. SaveMail sm = new SaveMail();
  30. sm.save(wf, name);
  31. return mapping.findForward("sendbox");
  32. }
  33. public ActionForward sendsave(ActionMapping mapping, ActionForm form,
  34. HttpServletRequest request, HttpServletResponse response) {
  35. WriteForm wf = (WriteForm)form;
  36. String name = "jhw3266204@sina.com";
  37. String password = "jhw3266204";
  38. SendMail sm = new SendMail();
  39. SaveMail sml = new SaveMail();
  40. sm.sendmail(wf, name, password);
  41. sml.save(wf, name);
  42. return mapping.findForward("sendbox");
  43. }
  44. }