表单提交到email问题

zhy0771 2005-04-14 12:08:43
<form action="mailto:charis.zhou@163.com" encType="text/plain" method=post>

这上把form里的内容提交到表单里
默认是用outlook提交 前提是outlook里有设账号 如果没有就发不了

如果我没设outlook 而我用的foxmail呢 那我怎么样才能用foxmail 发呢??????
...全文
189 18 打赏 收藏 转发到动态 举报
写回复
用AI写文章
18 条回复
切换为时间正序
请发表友善的回复…
发表回复
underone 2005-04-15
  • 打赏
  • 举报
回复
在iis下直接运行就行了
patchclass 2005-04-15
  • 打赏
  • 举报
回复
呵呵,很好玩,大家都有点答非所问
一个是用客户端方法实现,一个是用服务器段实现,两个都是需要一定的环境和配置的,恶意不说清楚
看楼主的意思是想用客户端方法 调用foxmail来实现
mailto:charis.zhou@163.com这个就是调用默认的客户端邮件工具了,如果你设置foxmail为默认,自然就调用了foxmail了
mailto:charis.zhou@163.com后面还可以加一些参数,&subject=xxx等等
zhy0771 2005-04-15
  • 打赏
  • 举报
回复
没有
我现在先不用asp程序 发一下
我也搞不明白
你试试 underone(underone的代码行不行
shinesunbj 2005-04-14
  • 打赏
  • 举报
回复
zhy0771,行了吗?行了给我发套源码,我这段时间也在搞这个,烦!!
email:gui_yi@sohu.com
谢谢
zhy0771 2005-04-14
  • 打赏
  • 举报
回复
还有能不能带附件??
zhy0771 2005-04-14
  • 打赏
  • 举报
回复
还有
我收到邮件后 里面的格式我怎么能改一下呢
zhy0771 2005-04-14
  • 打赏
  • 举报
回复
<!--#include file="top.asp"-->
<!--#include file="bottom.asp"-->
这两个嵌入文件是那来的///
我先试试
underone 2005-04-14
  • 打赏
  • 举报
回复
你稍微改改就行了
underone 2005-04-14
  • 打赏
  • 举报
回复
<%
SendMail Request.Form("From"), "xxxx@sina.com", Request.Form("Subject"), Request.Form("Body"), null
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>信箱</title>
<link href="style.css" rel="stylesheet" type="text/css">
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function frmInput_onsubmit()
{
if ( frmInput.From.value == "" )
{
alert("姓名不能为空!");
frmInput.From.focus();
return(false);
}
if ( frmInput.Subject.value == "" )
{
alert("邮件主题不能为空!");
frmInput.Subject.focus();
return(false);
}
if ( frmInput.Body.value == "" )
{
alert("邮件内容不能为空!");
frmInput.Body.focus();
return(false);
}
}

//-->
</SCRIPT>
</head>
<body topmargin="0" bottommargin="0" background="images/bodybg.gif">
<table width="762" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<form action="" method=POST id=frmInput name=frmInput LANGUAGE=javascript onsubmit="return frmInput_onsubmit()">
<tr>
<td width="1" bgcolor="#565656"></td>
<td valign="top" bgcolor="#FFFFFF">
<!--#include file="top.asp"-->
<table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="200" bgcolor="#F2F2F2" align="center" valign="top"><img src="images/LeaderMailMore.gif" border="0"></td>
<td width="1" bgcolor="#A0A0A0"></td>
<td valign="top"><br><table border="0" align="center" cellpadding="0" cellspacing="3">
<TR>
<TD align=right>姓    名:</TD>
<TD><INPUT name=From type="text" class="frmInput" size=20 maxlength=50></TD>
</TR>
<TR>
<TD align=right>邮件主题:</TD>
<TD><INPUT name=Subject type="text" class="frmInput" size=60 maxlength=100></TD>
</TR>
<TR>
<TD align=right>邮件内容:</TD>
<TD><TEXTAREA name=Body cols=60 rows=20 class="frmInput"></TEXTAREA></TD>
</TR>
<TR>
<TD align=center colspan=2><INPUT type="submit" value=" 提 交 " id=submit name=submit class="frmInput" height="30"></TD>
</TR>
</table>
<br>
<br></td>
</tr>
<tr bgcolor="#A0A0A0">
<td colspan="3" height="1"></td>
</tr>
</table>
<!--#include file="bottom.asp"--></td>
<td width="1" bgcolor="#565656"></td>
</tr></form>
</table>
</body>
</html>
<%
Sub SendMail(strFrom,strTo,strSubject,strBody,strAttach)
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.BodyFormat = 0
objMail.MailFormat = 0

objMail.From = strFrom
objMail.To = strTo
objMail.Subject = strSubject
objMail.Body = strBody

If IsEmpty(strAttach)=False And IsNull(strAttach)=False Then
objMail.AttachFile strAttach
End If
response.write objMail.Send
set objMail = nothing

If strFrom <> "" then
%>
<script language=javascript>
<!--
alert("邮件已成功发送!");
window.location.href="Default.asp?channelMarkId=SY";
-->
</script>
<%
End If
End Sub
%>
zhy0771 2005-04-14
  • 打赏
  • 举报
回复
<<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>员工求职申请表</title>
</head>
<body bgcolor="#EBEBEB">
<span class="style4">
<form action="mailto:charis.zhou@163.com" encType="text/plain" method=post>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#ffffff">
<td height="20">户    籍</td>
<td height="20"><input type="text" name="vcha_hukouaddress" value="" style="width:150px" maxlength="500"></td>
<td height="20">手机号码</td>
<td height="20"><input type="text" name="vcha_movetel" value="" style="width:100px" maxlength="250"></td>
<td height="20">宅    电</td>
<td height="20"><input type="text" name="vcha_tel" value="" style="width:100px" maxlength="50"></td>
</tr>
<tr bgcolor="#ffffff">
<td height="20">现住地址</td>
<td height="20"><input type="text" name="vcha_zhuadd" value="" style="width:250px" maxlength="500"></td>
<td height="20">E_Mail</td>
<td height="20"><input type="text" name="vcha_email" value="" style="width:150px" maxlength="250"></td>
<td height="20">上传照片</td>
<td height="20"><input type="text" name="upfilepath" maxlength="39" style="width:100px" value="">
<input type="button" name="mybutton" value="选择" onClick="fileupload()"></td>
</tr>
</table></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#ffffff">
<td align="center"><input type="submit" onClick="SendMail()" value="提交">
    
<input type="button" value="关闭" onClick="window.close();">
</td>
</tr>
</table></td>
</tr>
</table>
</form>
</span>
</body>
</html>
zhy0771 2005-04-14
  • 打赏
  • 举报
回复
还是看不懂 有点迷糊了
这样我把全部代码粘上 你帮我写上好吧
underone 2005-04-14
  • 打赏
  • 举报
回复
<%
'调用
SendMail "strFrom", "strTo", "strSubject", "strBody", null
%>
不用考虑什么用outlook还是foxmail发送
你把strTo写对了就行了
zhy0771 2005-04-14
  • 打赏
  • 举报
回复
我现在没有用jmail
我看你说的好像是jmail呢

我这就是把form 提交到 action指定的邮箱中 前提是机器上一定要装有默认的邮件客房端程序
zhy0771 2005-04-14
  • 打赏
  • 举报
回复
underone(underone

你好这位兄弟 说实话有点看不太懂你的程序 我的问题的意思是让系统自己选择用那个发送

我在你的程序里没看到有outlook \ foxmail 啊

在说我怎么来调用呢


<form action="mailto:charis.zhou@163.com" encType="text/plain" method=post>


.......................................


<input type="submit" value="提交">
</form>
underone 2005-04-14
  • 打赏
  • 举报
回复
strFrom写信人地址
strTo收信人地址
strSubject邮件主题
strBody邮件内容
strAttach这个用null就行了
underone 2005-04-14
  • 打赏
  • 举报
回复
<%
Sub SendMail(strFrom,strTo,strSubject,strBody,strAttach)
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.BodyFormat = 0
objMail.MailFormat = 0

objMail.From = strFrom
objMail.To = strTo
objMail.Subject = strSubject
objMail.Body = strBody

If IsEmpty(strAttach)=False And IsNull(strAttach)=False Then
objMail.AttachFile strAttach
End If
response.write objMail.Send
set objMail = nothing

If strFrom <> "" then
%>
<script language=javascript>
<!--
alert("邮件已成功发送!");
window.location.href="Default.asp";
-->
</script>
<%
End If
End Sub
%>
zhy0771 2005-04-14
  • 打赏
  • 举报
回复
好像没写完 还请说的再清楚一些
underone 2005-04-14
  • 打赏
  • 举报
回复
<%
Sub SendMail(strFrom,strTo,strSubject,strBody,strAttach)
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.BodyFormat = 0
objMail.MailFormat = 0

objMail.From = strFrom
objMail.To = strTo
objMail.Subject = strSubject
objMail.Body = strBody

If IsEmpty(strAttach)=False And IsNull(strAttach)=False Then
objMail.AttachFile strAttach
End If
response.write objMail.Send
set objMail = nothing

If strFrom <> "" then
%>
用这个函数

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧