写邮件 $userEmail
 发送级别:
 
收件人(to):
通讯录
$addrList
 
  抄送 密送     提示:多个邮件地址可用“,”分隔
主题:
附件:
增加附件   提示:您能发送的邮件附件总容量最大为15M!
正文:
$editor
 
签名文件:
 发送级别:
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","<div id=wEdit contentEditable=true style='height:200;width:100%;background:white;border:1px solid #7E9DB9;border-top:0;padding:6;overflow:auto;word-break:break-all;'></div>") else l=l.replace("$editor","<div style='width:100%;height:200;background:white;border:1px solid #7E9DB9;border-top:0'><div etype=dlghide style=height:200><iframe id=wEdit frameborder=0 style='width:100%;height:200;border:0'></iframe></div></div>") 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<a.length;i++){ ad=a[i].split("|") sTb.add("<tr><td nowrap style='background:url(http://image2.sina.com.cn/rny/ria2/write_linker_dash.gif) repeat-x bottom'><img src=http://image2.sina.com.cn/rny/ria2/group.gif align=absmiddle> <a class=br href=\"javascript:addr_add('"+ad[0]+"',1)\">"+ad[1]+"</a></td></tr>") } a=glb.addr_list.toArray("n") sortIndex=2 sortDir=-1 a.sort(sortFoo) sTb1=new Array() for(i=0;i<a.length;i++){ if(a[i]=="") continue ad=a[i].split("|") sTb.add("<tr><td nowrap style='background:url(http://image2.sina.com.cn/rny/ria2/write_linker_dash.gif) repeat-x bottom'><img src=http://image2.sina.com.cn/rny/ria2/star"+(ad[2]==1 ? 1 : 0)+".gif align=absmiddle> <a class=dr href=\"javascript:addr_add('"+escape("\""+ad[4]+"\" <"+ad[5]+">")+"')\">"+ad[4]+"</a></td></tr>") sTb1.add("<tr feml='"+ad[5]+"' fname='"+escape(ad[4])+"' nowrap><td></td></tr>") } l=l.replace(/\<tr[^\$]*\$addrList[^r]*r\>/gi,sTb.join("")) l=l.replace(/\<tr[^\$]*\$emailList[^r]*r\>/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<arTo.length;i++){ if(arTo[i].inc(glb.email)) continue aTo.add(arTo[i]) } sTo=aTo.join(",") document.fmRun.cc.value=untxt(glb.mail_cc) } if(glb.write_type=="upd") sTo=glb.mail_to document.fmRun.to.value=untxt(sTo) if(glb.write_type=="upd") document.fmRun.cc.value=untxt(glb.mail_cc) if(glb.write_type.indexOf("re")==0) sSubject+="RE:" if(glb.write_type.indexOf("fwd")==0) sSubject+="FWD:" sSubject+=glb.mail_subject document.fmRun.subj.value=untxt(sSubject) sBody="<br>----- Original Message -----<br>" sBody+="From:"+glb.mail_from+"<br>" sBody+="To:"+glb.mail_to+"<br>" sBody+="Subject:"+glb.mail_subject+"<br>" sBody+="Date:"+glb.mail_date+"<br>" 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="<FONT color=blue>FWD_attachment.eml</FONT>" } 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<a.length;i++){ ad=a[i].split("|") s1+=ad[0]+"|" s2+=ad[2]+"|"+ad[5]+"|"+ad[6]+"\n" s+="<font color=blue>"+ad[0]+"</font><br>" } 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="<div id=bxAttach_0 style=padding:3;padding-left:0><input type=file name=atth0 size="+(screen.width==800?40:60)+" onkeypress='blur()' onpaste='return false'> <a href=javascript:delAttach(0) class=br>移除附件</a></div>" 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='<form id="write_mail_form1" action="editnolimited.php" method="POST" target="write_mail_form1_wData"></form><iframe id="write_mail_form1_wData" name="write_mail_form1_wData" style="display:none;width:100%"></iframe>'; 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="<style>body,table,p,font{font-size:12px;font-family:宋体}p{margin:0}img{border:0}</style>\n<body>"+v+"<body>" document.fmRun.msgtxt.value="<style>p{margin:0}img{border:0}</style>\n<font style='font-size:12px'>"+v+"</font>" 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("<div align=center style=height:45;margin-top:80>邮件正在"+(document.fmRun.issend.value==1?"发送":"保存")+"中,请您耐心等待......</div>",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<a.length;i++){ ad=a[i].split("|") if(ad[0]!=ffid) continue ad[5]="\""+ad[4]+"\" <"+ad[5]+">" 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.rows.length;i++){ if(i<tb.sel.rowIndex&&tb.rows[i].style.display=="") n1=i if(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<tb.rows.length;i++){ tr=tb.rows[i] feml=tr.getAttribute("feml") fname=unescape(tr.getAttribute("fname")) s="" if(fname.indexOf(v)==0) s="\""+fname.replace(v,"<font color=black>"+v+"</font>")+"\" &lt;"+feml+"&gt;" if(feml.indexOf(v)==0) s="\""+fname+"\" <"+feml.replace(v,"<font color=black>"+v+"</font>")+">" if(tx.value.inc(feml)) s="" tr.cells[0].innerHTML="<nobr>"+s+"</nobr>" 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","<div id=bxAttach_"+i+" style=padding:3;padding-left:0><input type=file name=atth"+i+" size="+(screen.width==800?40:60)+" onkeypress='blur()' onpaste='return false'> <a href=javascript:delAttach("+i+") class=br>移除附件</a></div>") 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("<style>p{margin:0}img{border:0}</style><sc"+"ript>document.domain='sina.com.cn'</scr"+"ipt>"+v) else if(isIE){ glb.hte_win.innerHTML=v } else doc.body.innerHTML="<style>p{margin:0}img{border:0}</style>"+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?"<img src=http://image2.sina.com.cn/rny/free2005/images/blank.gif style=position:absolute;width:100%;height:100%><div align=center><img width=0 height=100% align=absmiddle>$value</div>":"<div align=center>$value</div>" l="<table bgcolor=#EEEEEE oncontextmenu=parent.hide('bxFamily') onmouseout=\"if("+isIE+")if(!this.contains(event.toElement))parent.hide('bxFamily')\" cellpadding=0 cellspacing=0 width=100% height=100% style='border:1px solid #7E9DB9'>" a="宋体,黑体,隶书,幼圆".split(",") for(i=0;i<a.length;i++){ l+="<tr align=left onclick=parent.hte_exc('family','"+a[i]+"') onmouseover=this.style.color='#497D01' onmouseout=this.style.color=''><td>"+tmpl_inner.replace("$value",a[i])+"</td></tr>" } l+="</table>" glb.hte_family=l l="<table bgcolor=#EEEEEE oncontextmenu=parent.hide('bxSize') onmouseout=\"if("+isIE+")if(!this.contains(event.toElement))parent.hide('bxSize')\" cellpadding=0 cellspacing=0 width=100% height=100% style='border:1px solid #7E9DB9'>" for(i=1;i<=7;i++){ l+="<tr onclick=parent.hte_exc('size','"+i+"') onmouseover=this.style.color='#497D01' onmouseout=this.style.color=''><td>"+tmpl_inner.replace("$value",i)+"</td></tr>" } l+="</table>" glb.hte_size=l l="<div oncontextmenu=parent.hide('bxColor') onmouseout=\"if("+isIE+")if(!this.contains(event.toElement))parent.hide('bxColor')\" style='display:table-cell;width:100%;height:100%;border:1px solid #7E9DB9'>" l+="<img width=148 height=93 onmousemove=\"parent.hte_menu_mousemove(event,'wColor')\" src=http://image2.sina.com.cn/rny/free2005/images/hte_mucolor.gif>" l+="<img id=selFrm onclick=parent.hte_exc('color',this.index) src=http://image2.sina.com.cn/rny/free2005/images/hte_frmcolor.gif style=position:absolute;left:3;top:3></div>" glb.hte_color=l l="<div oncontextmenu=parent.hide('bxFace') onmouseout=\"if("+isIE+")if(!this.contains(event.toElement))parent.hide('bxFace')\" style='height:100%'>" l+="<img onmousemove=\"parent.hte_menu_mousemove(event,'wFace')\" src=http://image2.sina.com.cn/rny/free2005/images/hte_muface.gif>" l+="<img id=selFrm onclick=parent.hte_exc('face',this.index) src=http://image2.sina.com.cn/rny/free2005/images/hte_frmface.gif style=position:absolute;left:1;top:1></div>" 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(/<style>[^<]*<\/style>/gi,"").replace(/<script>[^<]*<\/script>/gi,"") v="<style>p{margin:0}img{border:0}</style>\n<body>"+v+"</body>" 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; } } }