发送电子邮件

来源:互联网 发布:淘宝信誉提升平台担保 编辑:程序博客网 时间:2024/06/11 01:54
       var contentEle = $("<div></div>");        $('<div><div>').appendTo(document.body).dialog({            title: '发送邮件',            width: 450,            height: 600,            closed: false,            cache: false,            content: contentEle,            modal: true        });        $('<div>收件人</div>').appendTo(contentEle);        t.mailReceive=$("<input type='text'></input>").appendTo(contentEle)        .css("width", 400).css("height", 28);        $('<div>标题</div>').appendTo(contentEle);        t.mailTitle=$("<input type='text'></input>").appendTo(contentEle)        .css("width", 400).css("height", 28);        $('<div>正文</div>').appendTo(contentEle);        t.mailContent=$("<textarea></textarea>").appendTo(contentEle)        .css("width", 400).css("height", 400);        t.executeSQLBtn = $("<a style=\"margin-left:340px;margin-top:5px;\"></a>").appendTo(contentEle);        t.executeSQLBtn.linkbutton({            text: '发送邮件',            plain: true        });        //发送邮件        t.executeSQLBtn.click(function (){          //使用send cloud引擎发送          var mailEngine=$cc.conf.mailEngine.SendCloud;          //立即发送          var mailSendType=$cc.conf.mailSendType.Promptly;          //收件人          var receive=t.mailReceive.val();          //标题          var subject=t.mailTitle.val();           //正文          var content=t.mailContent.val();          $cc.zeus.sendMailForContent(mailEngine,mailSendType,receive,subject,content,function(resp){              if(resp['ok']){                 //发送成功                 alert('send mail success');              }else{                   //发送失败              }          });              });

0 0
原创粉丝点击