x
'),c.close();var d=c.documentElement.scrollHeight>c.body.scrollHeight;return a.parentNode.removeChild(a),b=d?document.documentElement:document.body}var b=null;Object.defineProperty(document,"scrollingElement",{get:a})}();var b;return{afterOpen:function(c){c||(b=document.scrollingElement.scrollTop,document.body.classList.add(a),document.body.style.top=-b+"px")},beforeClose:function(c){c||(document.body.classList.remove(a),document.scrollingElement.scrollTop=b)},getScrollTop:function(){return b}}}("popup-open"); 
  • 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    Discuz! 6.1 - 发送HTML格式电子邮件
    复制代码 代码如下:

    --- sendmail.inc.original.php
    +++ sendmail.inc.mime.php
    @@ -33,23 +33,23 @@

    $email_subject = '=?'.$charset.'?B?'.base64_encode(str_replace("\r", '', str_replace("\n", '', '['.$bbname.'] '.$email_subject))).'?=';
    $email_message = chunk_split(base64_encode(str_replace("\r\n.", " \r\n..", str_replace("\n", "\r\n", str_replace("\r", "\n", str_replace("\r\n", "\n", str_replace("\n\r", "\r", $email_message)))))));

    $email_from = $email_from == '' ? '=?'.$charset.'?B?'.base64_encode($bbname)."?= <$adminemail>" : (preg_match('/^(.+?) \&;(.+?)\&;$/',$email_from, $from) ? '=?'.$charset.'?B?'.base64_encode($from[1])."?= <$from[2]>" : $email_from);

    foreach(explode(',', $email_to) as $touser) {
    $tousers[] = preg_match('/^(.+?) \&;(.+?)\&;$/',$touser, $to) ? ($mailusername ? '=?'.$charset.'?B?'.base64_encode($to[1])."?= <$to[2]>" : $to[2]) : $touser;
    }
    $email_to = implode(',', $tousers);

    -$headers = "From: $email_from{$maildelimiter}X-Priority: 3{$maildelimiter}X-Mailer: Discuz! $version{$maildelimiter}MIME-Version: 1.0{$maildelimiter}Content-type: text/plain; charset=$charset{$maildelimiter}Content-Transfer-Encoding: base64{$maildelimiter}";
    +$headers = "From: $email_from{$maildelimiter}X-Priority: 3{$maildelimiter}X-Mailer: Discuz! $version{$maildelimiter}MIME-Version: 1.0{$maildelimiter}Content-type: ".(true === is_string($sendmail_mime) ? $sendmail_mime : 'text/plain')."; charset=$charset{$maildelimiter}Content-Transfer-Encoding: base64{$maildelimiter}";

    $mail['port'] = $mail['port'] ? $mail['port'] : 25;

    if($mail['mailsend'] == 1 && function_exists('mail')) {

    @mail($email_to, $email_subject, $email_message, $headers);

    } elseif($mail['mailsend'] == 2) {

    if(!$fp = fsockopen($mail['server'], $mail['port'], $errno, $errstr, 30)) {
    $errorlog('SMTP', "($mail[server]:$mail[port]) CONNECT - Unable to connect to the SMTP server", 0);

    之后可以通过设定全局变量$sendmail_mime来发送HTML格式电子邮件。
    上一篇:php下cms程序转移服务器的一般步骤
    下一篇:asp,asp.net,php,jsp下的301转向代码
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    Discuz! 6.1 - 发送HTML格式电子邮件 Discuz,6.1,发送,HTML,格式,