写邮件
$userEmail
发送级别:
高
普通
低
收件人(to):
通讯录
$addrList
抄送
密送
提示:多个邮件地址可用“,”分隔
抄送(cc):
密送(Bcc):
主题:
附件:
增加附件
提示:您能发送的邮件附件总容量最大为15M!
正文:
$editor
保留一份在寄件夹中
对方读到信时给我回应
包含签名文件
签名文件:
______________________________________ $signText
发送级别:
高
普通
低
$emailList
window.getData=function(){ hte_barIni() if(glb.addr_list==null) link("addr_memberlist.php","echoOk()") else echoOk() } window.echoOk=function(){ var l,a,i,ad,s,sTb,sTb1 glb.imgPath="http://image2.sina.com.cn/rny/free2005/images/" l=iniPage("writemail") if(isIE&&!isIE5||isIE5_5) l=l.replace("$editor","
") else l=l.replace("$editor","
") if(glb.addr_list==null){ glb.addr_group=xv("addr_grouplist") glb.addr_list=xv("addr_memberlist") } l=l.replace(/\$signText/g,glb.setsign) a=glb.addr_group.toArray("n") sTb=new Array() for(i=0;i
"+ad[1]+"
") } a=glb.addr_list.toArray("n") sortIndex=2 sortDir=-1 a.sort(sortFoo) sTb1=new Array() for(i=0;i
")+"')\">"+ad[4]+"
") sTb1.add("
") } l=l.replace(/\
/gi,sTb.join("")) l=l.replace(/\
/gi,sTb1.join("")) oo("bxMain").innerHTML=l if(screen.width==800){ oo("bxHte").style.width=500 oo("wEdit").style.width=500 } if(screen.width>800){ oo("bxHte").style.width=620 oo("wEdit").style.width=620 } oe("wFamily").location.replace("blank.htm?key=hte_family") oe("wSize").location.replace("blank.htm?key=hte_size") oe("wColor").location.replace("blank.htm?key=hte_color") oe("wFace").location.replace("blank.htm?key=hte_face") if(isIE5&&!isIE5_5){ wEdit.location.replace("write_edit.htm") } if(glb.write_type=="to"){ document.fmRun.to.value=glb.mail_eml } if("re,re_all,fwd_body,fwd_att,upd".inc(glb.write_type,",")){ var sTo="",sSubject="",sBody="" var aFavor=glb.setfavor.split("|") if(glb.write_type=="re") sTo=glb.mail_from if(glb.write_type=="re_all"){ sTo=glb.mail_from+(glb.mail_to!=""?",":"")+glb.mail_to var arTo=sTo.split(",") var aTo=new Array() sTo="" for(i=0;i
" sBody+="To:"+glb.mail_to+"
" sBody+="Subject:"+glb.mail_subject+"
" sBody+="Date:"+glb.mail_date+"
" if(glb.write_type=="upd") { sBody=glb.mail_body } else if(glb.write_type=="fwd_att"){ sBody="\n注:原信被当作附件\"FWD_attachment.eml\"发送" document.fmRun.fid.value=glb.mail_fid document.fmRun.fwd_mid.value=glb.mail_mid document.fmRun.atth17.value="FWD_attachment.eml" oo("bxAttach_more").style.cssText="padding-top:6" oo("bxAttach_more").innerHTML="
FWD_attachment.eml
" } else if(aFavor[2]==2||glb.write_type=="fwd_body") { sBody+=glb.mail_body } else if(aFavor[2]==2 && glb.write_type=="re"){ sBody+=glb.mail_body } else if(aFavor[2]==2 && glb.write_type=="re_all") { sBody+=glb.mail_body//修正了此处,修正回复全部会多出内容的Bug } //console.log(sBody); document.fmRun.msgtxt.val=sBody window.setTimeout("document.fmRun.msgtxt.value=document.fmRun.msgtxt.val",10) } if(glb.write_type=="upd"||glb.write_type=="fwd_body"){ var s="",s1="",s2="" if(glb.write_type=="upd"){ document.fmRun.fid.value=glb.mail_fid document.fmRun.mid.value=glb.mail_mid } else document.fmRun.oldmid.value=glb.mail_mid a=glb.mail_attach for(i=0;i
"+ad[0]+"
" } document.fmRun.oldattdisp.value=s1.slice(0,-1) document.fmRun.oldattfile.value=s2.slice(0,-1) oo("bxAttach_more").style.cssText="padding-top:6" oo("bxAttach_more").innerHTML=s } if(document.fmRun.cc.value!="") showInput("cc") oo("bxAttach").innerHTML="
移除附件
" glb.write_input=document.fmRun["to"] if(isMoz) oo("bxEmlList").style.left=245 if(isMoz||isOpr) document.fmRun["to"].onkeypress=document.fmRun["cc"].onkeypress=document.fmRun["bcc"].onkeypress=function(e){return txEml_keydown(isMoz?e.keyCode+e.charCode:event.keyCode)} else document.fmRun["to"].onkeydown=document.fmRun["cc"].onkeydown=document.fmRun["bcc"].onkeydown=function(){return txEml_keydown(event.keyCode)} oo("bxEmlList").etype="menu" glb.write_type=null oo("bxEmlList").style.left=isMoz?238:236 window.setTimeout("glb.write_fm=document.fmRun.innerHTML",30) glb.write_timeVal=(new Date()).valueOf() //write_time() if(!isIE5||isIE5_5) window.setTimeout("hte_ini()",100) setInterval('write_mail_rpc()',900000) } window.write_mail_rpc=function(){ var write_mail_form1='
'; oo("write_mail_data").innerHTML=write_mail_form1; document.write_mail_form1.submit() } window.menu_click=function(key){ switch(key){ case "发送邮件": document.fmRun.issend.value=1 v=(isIE5&&!isIE5_5)||!isIE?glb.hte_win.document.body.innerHTML:glb.hte_win.innerHTML // document.fmRun.msgtxt.value="\n"+v+"" document.fmRun.msgtxt.value="\n
"+v+"
" document.fmRun.btPut.click() break case "保存到草稿夹": if(glb.useSize>=2000){ msg("您的邮箱已经超空间,保存邮件功能暂时无法使用!") return } document.fmRun.issend.value=0 v=(isIE5&&!isIE5_5)||!isIE?glb.hte_win.document.body.innerHTML:glb.hte_win.innerHTML document.fmRun.msgtxt.value=v document.fmRun.btPut.click() break case "重写邮件": document.fmRun.reset() break } } window.showWait=function(){ dlg_show("
邮件正在"+(document.fmRun.issend.value==1?"发送":"保存")+"中,请您耐心等待......
",300,160) } window.sendOk=function(){ if(document.fmRun.issend.value==1) link("tmpl:sendok") else{ var s=xv("xUseSize") if(s!="") glb.useSize=s*1 msg("邮件成功保存到草稿夹!") } glb.write_fm=document.fmRun.innerHTML } window.moveArrow=function(key){ hide("arto") hide("arcc") hide("arbcc") show("ar"+key) glb.write_input=document.fmRun[key.toLowerCase()] } window.showInput=function(key){ if(key=="cc"){ oo("acc").style.display="none" oo("trcc").style.display="" } else{ oo("abcc").style.display="none" oo("trbcc").style.display="" } if(oo("acc").style.display=="none"&&oo("abcc").style.display=="none") oo("tbMain").deleteRow(1) bxAddrList_rsz() } window.addr_add=function(key,type){ var tx=glb.write_input,ffid,feml var l,a,i,ad if(type==1) ffid=key else feml=key l=tx.value if(l.slice(-1)!=","&&l!="") l+="," if(feml!=null&&feml!=""){ feml=unescape(feml) if(l.inc(feml)){ msg("该联系人已经加入了!") return } l+=unescape(feml)+"," } else{ a=glb.addr_list.toArray("n") ffid=unescape(ffid) for(i=0;i
" if(!l.inc(ad[5])) l+=ad[5]+"," } } tx.value=l tx.focus() tx.scrollTop=tx.scrollHeight } window.txEml_keydown=function(keyCode){ var tx=glb.write_input,tb=oo("tbEmlList"),bx=oo("bxEmlList") var v,l,i,n,n1,n2 if(bx.style.visibility==""){ if(keyCode==38||keyCode==40){ n1=n2=-1 for(i=0;i
tb.sel.rowIndex&&tb.rows[i].style.display==""){ n2=i break } } n=keyCode==38?n1:n2 if(n>-1) tbEmlList_mouseover(tb.rows[n].cells[0]) return false } if(keyCode==13||keyCode==32){ v="\""+unescape(tb.sel.getAttribute("fname"))+"\" <"+tb.sel.getAttribute("feml")+">" l=tx.value l=l.indexOf(",")==-1?"":l.slice(0,l.lastIndexOf(","))+"," tx.value=l+v+"," hide(bx) tx.focus() tx.scrollTop=tx.scrollHeight window.setTimeout("glb.write_input.value=glb.write_input.value.trim()",10) return false } } if(keyCode==13) return false bx.style.top=oo("tr"+tx.name).offsetTop+(isOpr?153:149) window.setTimeout("tbEml_match()",10) } window.tbEml_match=function(){ var tx=glb.write_input,tb=oo("tbEmlList"),bx=oo("bxEmlList") var l,v,s,i,tr,feml,fname,showMenu l=tx.value v=l.indexOf(",")==-1?l:l.slice(l.lastIndexOf(",")+1) if(v==""){ bx.style.visibility="hidden" return } showMenu="hidden" for(i=0;i
"+v+"")+"\" <"+feml+">" if(feml.indexOf(v)==0) s="\""+fname+"\" <"+feml.replace(v,"
"+v+"
")+">" if(tx.value.inc(feml)) s="" tr.cells[0].innerHTML="
"+s+"
" if(s!=""&&showMenu=="hidden"){ tbEmlList_mouseover(tr.cells[0]) showMenu="" } tr.style.display=s==""?"none":"" } bx.style.visibility=showMenu } window.tbEmlList_mouseover=function(ee){ if(ee.tagName!="TD") return var tb=oo("tbEmlList") if(tb.sel!=null) tb.sel.style.background="" tb.sel=ee.parentElement tb.sel.style.background="#E4E4E4" } window.addAttach=function(){ var i for(i=0;i<16;i++){ if(oo("bxAttach_"+i)==null){ insHtm("bxAttach","
移除附件
") break } } bxAddrList_rsz() if(i>=16) msg("最多只能添加16个附件!") } window.delAttach=function(index){ oo("bxAddrList").style.height=370 del("bxAttach_"+index) bxAddrList_rsz() } window.bxAddrList_rsz=function(){ oo("bxAddrList").style.height=oo("tbMain").offsetHeight-56 if(!isIE){ oo("bxHteMenu").style.top=1 window.setTimeout("oo('bxHteMenu').style.top=0",10) } } window.sendLv_click=function(index){ oo("youxj"+index).checked=true oo("youxj_t"+index).checked=true } /*window.write_time=function(){ var n,n_h,n_m,n_s if(oo("bxWriteTime")==null) return window.clearTimeout(glb.write_tmer) n=(new Date()).valueOf()-glb.write_timeVal n=parseInt(n/1000) if(n>1200){ msg("您的写信时间已经超过20分钟,请尽快保存信件以免丢失!") glb.write_timeVal=new Date().valueOf() } n_h=parseInt(n/3600) n_m=parseInt(n/60)%60 n_s=n%60 if(n_h<10) n_h="0"+n_h if(n_m<10) n_m="0"+n_m if(n_s<10) n_s="0"+n_s oo("bxWriteTime").innerHTML=n_h+":"+n_m+":"+n_s glb.write_tmer=window.setTimeout("write_time()",1000) }*/ window.chkMailTo=function(){ var l,a l=document.fmRun.to.value+","+document.fmRun.cc.value+","+document.fmRun.bcc.value l=l.replace(/;/g,",").replace(/[\,]+/g,",") a=l.split(",") if(a.length>25){ msg("收件人(包括抄送和密送)必须少于25人!") return false } else return true } window.page_unload=function(tmpl){ v=(isIE5&&!isIE5_5)||!isIE?glb.hte_win.document.body.innerHTML:glb.hte_win.innerHTML if(document.fmRun.msgtxt.value+document.fmRun.subj.value+v!=""&&!tmpl.inc("sendok")&&glb.write_fm!=document.fmRun.innerHTML){ conf("您没有保存的邮件将会丢失!您确定要离开吗?","window.clearTimeout(glb.write_tmer);loadTmpl('"+tmpl+"',1)") return false } window.clearTimeout(glb.write_tmer) } window.hte_ini=function(){ var w,doc,v v=document.fmRun.msgtxt.value if(!isIE) glb.hte_win=oo("wEdit").contentWindow else if(isIE5&&!isIE5_5) glb.hte_win=wEdit.window else glb.hte_win=oo("wEdit") doc=glb.hte_win.document if(isIE5&&!isIE5_5) doc.write("
document.domain='sina.com.cn'"+v) else if(isIE){ glb.hte_win.innerHTML=v } else doc.body.innerHTML=""+v doc.designMode="on" window.setTimeout("glb.write_body=hte_val()",50) } window.oe=function(obj){ var o if(!isIE) o=oo(obj).contentWindow else o=eval(obj).window return o } window.bxHte_event=function(e){ var ee=e.srcElement,key,w if(ee.tagName!="IMG") return cmd=ee.src.replace(/.+\//g,"").slice(4,-4).toLowerCase() if(cmd=="gd") return if(e.type=="mouseover"){ if(glb.hte_menu!=null){ glb.hte_menu.style.visibility="hidden" glb.hte_menu=null } ee.style.cssText="background:#FFFFFF;border:1px solid #7E9DB9" o=ee.getAttribute("dropmenu") if(o!=null){ glb.hte_menu=oo(o) glb.hte_menu.style.visibility="" } } if(e.type=="mouseout") ee.style.cssText="margin:1" if(e.type=="mousedown"&&!"family,size,color,face".inc(cmd,",")) window.setTimeout("hte_exc(cmd)",10); if(e.type=="mouseup"&&"family,size,color,face".inc(cmd,",")){ oo("bx"+cmd).style.visibility="" } } window.hte_exc=function(cmd,key,run){ var w=glb.hte_win,a,v w.focus() w.range=isIE ? w.document.selection.createRange() : w.getSelection() switch(cmd){ case "b": w.document.execCommand('bold',false,null) break case "i": w.document.execCommand('italic',false,null) break case "u": w.document.execCommand('underline',false,null) break case "l": w.document.execCommand('justifyLeft',false,null) break case "c": w.document.execCommand('justifyCenter',false,null) break case "r": w.document.execCommand('justifyRight',false,null) break case "ss": w.document.execCommand('insertunorderedlist',false,null) break case "sn": w.document.execCommand('insertorderedlist',false,null) break case "family": w.document.execCommand('FontName',false,key) hide('bxFamily') break case "size": w.document.execCommand('fontsize',false,key) hide('bxSize') break case "color": a="808080,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF".split(",") w.document.execCommand('forecolor',false,"#"+a[key]) hide('bxColor') break case "a": if(isIE) w.document.execCommand('createlink') else{ v=prompt("请输入链接路径","http://") if(v==""||v=="http://"||v==null) return w.document.execCommand('createlink',false,v) } break case "img": v=prompt("请输入图片路径","http://") if(v==""||v=="http://"||v==null) return w.document.execCommand('insertimage',false,v) break case "face": if(key==null) return w.document.execCommand('insertimage',false,glb.imgPath+"face/"+(key*1+1)+".gif") hide('bxFace') break } } window.hte_barIni=function(){ var l,a,i,sHTML,tmpl_inner tmpl_inner=isIE?"
$value
":"
$value
" l="
" a="宋体,黑体,隶书,幼圆".split(",") for(i=0;i
"+tmpl_inner.replace("$value",a[i])+"
" } l+="
" glb.hte_family=l l="
" for(i=1;i<=7;i++){ l+="
"+tmpl_inner.replace("$value",i)+"
" } l+="
" glb.hte_size=l l="
" l+="
" l+="
" glb.hte_color=l l="
" l+="
" l+="
" glb.hte_face=l } window.hte_menu_mousemove=function(e,win){ var dx=e.offsetX,dy=e.offsetY,x0=3,y0=3,dw=18,len=8,x,y,o if(win=="wFace"){ x0=y0=1 dw=27 } if(!isIE){ dx=e.layerX dy=e.layerY } x=parseInt((dx-x0)/dw) y=parseInt((dy-y0)/dw) if(x>7||y>4) return o=oe(win).document.getElementById('selFrm') o.index=y*len+x o.style.left=x*dw+x0 o.style.top=y*dw+y0 } window.hte_val=function(){ var v v=(isIE5&&!isIE5_5)||!isIE?glb.hte_win.document.body.innerHTML:glb.hte_win.innerHTML if(isIE5&&!isIE5_5) v=v.replace(/\n"+v+"" return v } document.onkeydown=function(){ if(isIE){ if(event.keyCode==13&&glb.tmpl=="writemail"&&document.activeElement.tagName=="INPUT"){ return false; } if(event.keyCode==8&&glb.tmpl=="writemail"&&document.activeElement.tagName=="TD"){ page_unload("writemail") return false; } } }