邮箱网站jsp+python源代码

发布时间:2019-09-23 17:00:03编辑:auto阅读(1880)

    该源代码适用于以下系列邮箱:
    [url]http://mail.zj139.com[/url]
    [url]http://mail.e165.com[/url]
    [url]http://mail.sd139.com[/url]
    [url]http://mail.e165.com[/url]
    网站由jsp+python构成。
    由于网站容量有20M,只上传部分,如您需要,可以留下你的电子邮件。本blog所有
    代码都用于学习,请勿用于商业。
     
     
    代码范文:
    <%
    import _session
    import wmlib
    import cgi
    import smcic
    import srpc
    import string
    import urllib
    import base64
    import jpyhp
    import time
    import reglib
    flag=0
    lan=cgi_session['LANUAGE']
    %>
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<%= wmlib.LanCharset(lan)%>">
    <link rel="stylesheet" href="wmstyle.css" type="text/css">
    </head>
    <body bgcolor="<%= wmlib.getColor('workspace.bgcolor')%>" text="<%= wmlib.getColor('workspace.textcolor')%>">
    <%
    cli=cgi_session.cli
    uid=cgi_session['UID']
    username=cgi_session['USERNAME']
    stime=time.time()
    login_name=cgi_session['USERNAME']+'@'+cgi_session['DOMAIN']
    if cgi_args.has_key('act'):
       HUADAN_NOTIFY=wmlib.getArgValue(cgi_args,'chk_HUADAN_NOTIFY')
       smcic.call_set_userval(cli,uid,'HUADAN_NOTIFY',HUADAN_NOTIFY)
       if HUADAN_NOTIFY=='1':
          flag=1
          smcic.call_send_event(cli,'send_huadan',uid,'','','')
    %>
    <table width="98%" border="0" align="center" cellspacing="0">
      <tr>
        <td> <table width="100%" border="1" cellspacing="0" cellpadding="2" bordercolordark="#FFFFFF"  bordercolorlight="#000000" bgcolor="<%= wmlib.getColor('workspace.menubar.bgcolor')%>">
            <tr>
              <td><b><%= login_name %></b><br><%= wmlib.Lanuage(lan,'手机帐单设置','Preference')%></td>
            </tr>
          </table></td>
      </tr>
      <tr>
        <td height="3"></td>
      </tr>
      <%#if cgi_args.has_key('act') and cgi_args['act']=='submit' and flag==1%>
      <%
      mail_body="""
      <html>
      <head>
      <body>
      亲爱的如意邮箱用户(%s):<br>
          感谢您对如意邮箱的新业务的支持,您已经定制了发送手机账单,我们会在每月10号左右通过邮件向您提供上个月的手机账单,该项业务为免费服务。<br><br>
      <div align="right">中国<%= reglib.getMailbelongs()%>河南分公司</div>
      </html>
      </head>
      </body>""" % username
      mailbody=wmlib.genMailMessage("管理员","如意邮箱用户",'','',"您已经定制了发送手机账单",'9',0,1,mail_body,[],[])
      mail_from="[email]admin@zy165.com[/email]"
      mail_to=username+'@zy165.com'
      #print >> stdout, mail_to
      re=wmlib.sendMail(mail_from,mail_to,'','',mailbody)
      #print >> stdout, re
    %>
      <tr>
        <td class="wmstyle" height="17"><font color="#ff0000">你已经选择接收手机帐单!确认信件已发出!</font></td>
      </tr>
    <%#else%>
       <%#if cgi_args.has_key('act') and cgi_args['act']=='submit' and flag==0%>
      <tr>
        <td class="wmstyle" height="17"><font color="#ff0000">你已经放弃选择接收手机帐单!</font></td>
      </tr> 
     
      <%#endif%>

      <%#endif%>
      <tr>
        <td> <form name="form1" method="post" action="main.py">
            <input type="hidden" name="pyhp" value="../ywb/huadan.jsp">
            <input type="hidden" name="act" value="submit">
            <table width="100%" border="1" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#000000" cellpadding="2">
              <tr>
                <td class="wmstyle"> <BR><b>服务说明:</b><BR>
                   1、如意邮箱定制手机帐单业务是免费项目(对如意通用户不开放此项业务)。<br>
                   2.如意邮箱用户如在5日前定制帐单,则得到的可能是上上个月的账单。如在5日以后定制,则得到上个月的账单。新入网用户只能在下个月10号左右得到入网当月账单。<br>
                   3、一般手机帐单信息发送时间为每月10日左右,目前仅提供帐单,随后我们将进一步提供详单。<br>
                   
                  <b> </b> </td>
              </tr>
              <tr>
                <td class="wmstyle" height="378"> <b>用户条款:</b><BR>
                   河南<%= reglib.getMailbelongs()%>竭力为<%= reglib.getMailbelongs()%>如意邮箱用户提供最好的服务。详情请咨询<%= reglib.getMailbelongs()%>客服热线1001或登陆<a href="[url]http://www.zy165.com[/url]" target="_blank">[url]www.zy165.com</a>[/url]查询。
                     如意邮箱帐单定制是为了向河南<%= reglib.getMailbelongs()%>如意邮箱用户提供更好的服务而推出的一项新举措。如果您要享受该服务,请确认: <BR>
                   1、您拥有一部河南<%= reglib.getMailbelongs()%>的130/131/133手机,并且用该手机注册了如意邮箱和帐单定制服务。<BR>
                     2、您已经仔细阅读了本服务声明,并且愿意接受该服务声明中的所有条款。 <br>
                      (1)关于服务担保<br>
                      河南<%= reglib.getMailbelongs()%>如意邮箱帐单定制会努力完善和提升帐单定制服务,对帐单定制系统的稳定性、用户信息的安全性、快速性等方面做最大努力。
                    <br>
                    (2)关于用户隐私制度<br>
                        尊重用户个人隐私是河南<%= reglib.getMailbelongs()%>如意邮箱帐单定制的一项基本政策。<br>
                      如意邮箱帐单定制不向外披露用户的个人信息及帐单内容,除非符合以下情况:<br>
                        a. 根据×××政府有关机构依国家利益或依相应法律程序要求。<br>
                        b. 在紧急情况下竭力维护用户个人、其它社会个体和社会大众的安全。 <br>
                      (3)关于信息服务<br>
                        用户在享用河南<%= reglib.getMailbelongs()%>如意邮箱帐单定制服务的同时,河南<%= reglib.getMailbelongs()%>如意邮箱会通过电子邮箱服务系统、短信或其他方式发报消息给用户,此信息包括但不限于服务条款的修改、服务变更等。
                    <br>
                      (4)关于用户义务<br>
                        用户必须妥善保护好自己的用户名和密码,由用户自身原因造成的用户个人资料泄露以及由此而产生的其他后果用户必须自己承担责任。<br>
                      (4)关于法律责任<br>
                        河南<%= reglib.getMailbelongs()%>如意邮箱话单定制系统寄送的帐单仅作为参考,不作为有效的合法证据。若本系统寄送的查询结果与您实际缴费通知不同,应以您实际的缴费通知或营业前台的原始话单记录为准,即河南<%= reglib.getMailbelongs()%>及其下属分公司不对该系统的寄送结果承担法律责任。<br>
                      (5)其他相关说明<br>
                        用户确认已仔细阅读了本服务条款,接受河南<%= reglib.getMailbelongs()%>如意邮箱帐单定制服务条款全部内容,成为河南<%= reglib.getMailbelongs()%>如意邮箱帐单定制系统的正式用户。用户在享受河南<%= reglib.getMailbelongs()%>如意邮箱帐单定制服务时必须完全、严格遵守本服务条款。<br>
                        河南<%= reglib.getMailbelongs()%>如意邮箱根据互联网的发展和×××有关法律、法规的变化,不断地完善服务质量并依此修改河南<%= reglib.getMailbelongs()%>如意邮箱帐单定制服务条款。用户的权利以及义务的表述,均以最新的服务条款为准。
                    <br>
                        河南<%= reglib.getMailbelongs()%>如意邮箱帐单定制定义的内容受相关法律的保护。用户不能擅自复制、再造这些内容、或创造与内容有关的派生产品。 <br>
                        河南<%= reglib.getMailbelongs()%>如意邮箱帐单定制的所有权、帐单定制服务条款的解释权归中国<%= reglib.getMailbelongs()%>有限公司河南分公司所有。<br>
                </td>
              </tr>
              <%
              res=smcic.call_get_usrgrp(cli,uid)
              if len(res)!=2 or res[0]!=1:
                 group=''
              else:
                 group=res[1].strip()
             
              if group=='':
                 res=smcic.call_get_value(cli,'OPTION_HUADAN')
                
              else:
                 res=smcic.call_get_grpval(cli,group,'OPTION_HUADAN')
                 if len(res)==2 and (res[0]==0 or (res[0]==1 and res[1]=='')):
                 res=smcic.call_get_value(cli,'OPTION_HUADAN')
              if len(res)!=2 or res[0]!=1:
                 option_huadan='0'
              else:
                 option_huadan=res[1].strip()

              option_huadan='1' #所有地区全部发送
              %>
              <%#if option_huadan=='1' %>
              <tr>
                <td class="wmstyle" height="22">
                  <%
                  res=smcic.call_get_userval(cli,uid,'HUADAN_NOTIFY')
         %>
                  <%#if res[1]=='1'%>
                  <input type="checkbox" name="chk_HUADAN_NOTIFY" value="1" checked>
                  <%#else%>
                  <input type="checkbox" name="chk_HUADAN_NOTIFY" value="1">
                  <%#endif%>
                  <%= wmlib.Lanuage(lan,'同意以上条款,每月向我发送手机话费帐单','Send me mobile bill')%></td>
              </tr>
              <tr>
                <td bgcolor="<%= wmlib.getColor('workspace.title.bgcolor')%>" height="22" align="center">
                  <div align="center"class="wmstyle"><a style="cursor:hand" align="right" onClick="form1.submit()"><u><font color="<%= wmlib.getColor('workspace.menubar.textcolor')%>"><%= wmlib.Lanuage(lan,'确认','Ok')%></font></u></a>
                    <a href="<%= wmlib.urlmark('main.py?display=home&pyhp=option.jsp',uid,stime)%>"><font color="<%= wmlib.getColor('workspace.menubar.textcolor')%>"><%= wmlib.Lanuage(lan,'返回','Close')%></font></a></div>
                </td>
              </tr>
              <%#else%>
              <tr>
                <td bgcolor="<%= wmlib.getColor('workspace.menubar.bgcolor')%>" height="22" align="center">
                  <div align="center"class="wmstyle"> <a href="<%= wmlib.urlmark('main.py?display=home&pyhp=option.jsp',uid,stime)%>"><font color="<%= wmlib.getColor('workspace.menubar.textcolor')%>"><%= wmlib.Lanuage(lan,'返回','Close')%></font></a></div>
                </td>
              </tr>
              <%#endif%>
            </table>
          </form></td>
      </tr>
      <tr>
        <td> <hr width="100%" size="1"> </td>
      </tr>
    </table>
    </body>
    </html>
     

关键字