- <%@ page language="java" contentType="text/html;charset=UTF-8"
- session="true" errorPage="err.jsp" %>
- <%@ include file="GVinc/gvImport.jsp" %>
- <jsp:useBean id="gm" scope="page" class="com.gamvan.tools.Gmail"/>
- <%
- if(gvUserID<=0){
- out.print(prtCenter("您尚未登陆,无权进行此项操作!","userLogin.jsp",1));
- out.close();
- if(true)return;
- }
- String userName="", userEmail="";
- int userID = TypeChange.stringToInt(request.getParameter("userID"));
- if(userID>0){
- cuc.setUserID(userID);
- cui = (ClubUserItem)cuc.userInfo();
- if(cui!=null){
- userName = cui.getUserName();
- userEmail = cui.getUserEmail();
- }
- }
- String myEmail = "";
- if(gvUserID>0){
- cuc.setUserID(gvUserID);
- cui = (ClubUserItem)cuc.userInfo();
- if(cui!=null){
- myEmail = cui.getUserEmail();
- }
- }
- // ==================执行发送========================
- String content = "";
- if(request.getMethod().equals("POST")){
- content = ">>"+userName+":你好!n";
- content += ">>您的朋友"+gvUserName+"从<"+clubName+">给您发来一封邮件n";
- content += ">>以下是详细内容nn";
- content += request.getParameter("content").trim();
- content += "nn>>>>>>本邮件回复地址为: "+myEmail+" <<<<<<";
- gm.setFromEmail(myEmail);
- gm.setFromName(gvUserName);
- gm.setToEmail(userEmail);
- gm.setToName(userName);
- gm.setSubject("来自<"+clubName+"> 在线发送的Email");
- gm.setContent(content);
- gm.setSmtpServer(clubSmtp);
- gm.setSmtpID(clubSmtpID);
- gm.setSmtpPass(clubSmtpPass);
- gm.setSmtpPort(clubSmtpPort); //验证服务器端口
- gm.setNeedSSL(clubSmtpSSL); //验证服务器要加密
- if(clubSmtpUsePass==1){
- gm.setNeedAuth("true");
- }else{
- gm.setNeedAuth("false");
- }
- try{
- gm.mailSender();
- }catch(Exception e){
- out.print(e.toString());
- }
- out.print(OutPrint.prtCenter("<a onclick="javascript:window.close()" href="#">"+gm.getMessage()+"</a>","",0));
- //out.print(Gfoot());
- out.close();
- if(true)return;
- }
- %>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title><%=clubTitle%></title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <link href="./GVimgs/favicon.ico" rel="Bookmark">
- <link rel="icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
- <link rel="shortcut icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
- <link href="./GVinc/main.css" rel="stylesheet" type="text/css" />
- <style type="text/css">
- <!--
- .style1 {color: #FF0000}
- -->
- </style>
- </head>
- <body>
- <DIV id="waitDiv" style="LEFT: 40%; VISIBILITY: hidden; POSITION: absolute; TOP: 30%; TEXT-ALIGN: center">
- <TABLE cellPadding=6 border=0>
- <TBODY><TR><TD align=middle>
- <IMG src="GVimgs/loading.gif" alt="请稍候..." width="30" height="30">
- <BR>
- <FONT color="red">数据载入中,请稍候...</FONT></TD></TR></TBODY></TABLE></DIV>
- <script language="javascript" type="text/javascript" src="GVscript/GVtopCode.js"></script>
- <SCRIPT language="javascript">
- //提交表单
- function postMsg(){
- var o=event.srcElement;
- o.gvSubmit.value="正在提交...";
- o.gvSubmit.disabled=true;
- o.gvBack.disabled=true;
- }
- function checkForm(){
- postMsg();
- return true;
- }
- gv_showWait('waitDiv', 1);
- </SCRIPT>
- <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
- <tr class="tab1">
- <td>
- <strong>您的位置</strong>>><a href="default.jsp" target="_parent">社区首页</a>>>
- <a href="main.jsp">进站画面</a>>> 在线发送EMAIL</td>
- </tr>
- </table>
- <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
- <form name="Gforms" id="Gforms" method="post" action="" onSubmit="return checkForm();">
- <tr class="tab2">
- <td width="100"><strong>收件人</strong></td>
- <td height="22">
- <%=userName%><br>
- (如果用户注册Email地址不正确将无法收到您的邮件)
- </td>
- </tr>
- <tr class="tab2">
- <td height="25"><strong>回复地址</strong></td>
- <td width="#">
- <span class="style1"><%=myEmail%></span>
- <br>
- 如果您注册的EMAIL有变动,请更新您的注册资料再来发送Email,否则网友(<%=userName%>)可能无法正确回复您的邮件!
- </td>
- </tr>
- <tr class="tab2">
- <td height="12"><strong>内容</strong></td>
- <td><textarea name="content" cols="60" rows="8" id="content"></textarea></td>
- </tr>
- <tr class="tab2">
- <td height="25"> </td>
- <td>
- <input name="gvSubmit" type="submit" id="gvSubmit" value="确定发送" />
-
- <input type="button" name="Submit" value="关闭窗口" onClick="javascript:self.close();"/></td>
- </tr></form>
- </table>
- <%=Gfoot()%>
- </body>
- </html>