• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP smtp类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中smtp的典型用法代码示例。如果您正苦于以下问题:PHP smtp类的具体用法?PHP smtp怎么用?PHP smtp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了smtp类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: sendEmail

 protected function sendEmail($smtpemailto, $mailsubject, $text)
 {
     import("ORG.Util.Smtp");
     $smtpserver = "smtp.126.com";
     //SMTP服务器
     $smtpserverport = 25;
     //SMTP服务器端口
     $smtpusermail = "[email protected]";
     //SMTP服务器的用户邮箱
     //$smtpemailto = "[email protected]";//发送给谁
     $smtpuser = "tianyu0915";
     //SMTP服务器的用户帐号
     $smtppass = "122126382";
     //SMTP服务器的用户密码
     //$mailsubject = "[Ty]";//邮件主题
     $mailbody = $text;
     //邮件内容
     $mailtype = "HTML";
     //邮件格式(HTML/TXT),TXT为文本邮件
     $smtp = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass);
     //这里面的一个true是表示使用身份验证,否则不使用身份验证.
     $smtp->debug = FALSE;
     //是否显示发送的调试信息
     $result = $smtp->sendmail($smtpemailto, $smtpusermail, $mailsubject, $mailbody, $mailtype);
     return $result;
 }
开发者ID:cjmi,项目名称:miniblog,代码行数:26,代码来源:BaseAction.class.php


示例2: connect

 function connect($params = array())
 {
     if (!isset($this->status)) {
         $obj = new smtp($params);
         if ($obj->connect()) {
             $obj->status = SMTP_STATUS_CONNECTED;
         }
         return $obj;
     } else {
         if (!empty($GLOBALS['_CFG']['smtp_ssl'])) {
             $this->host = "ssl://" . $this->host;
         }
         $this->connection = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
         if ($this->connection === false) {
             $this->errors[] = 'Access is denied.';
             return false;
         }
         @socket_set_timeout($this->connection, 0, 250000);
         $greeting = $this->get_data();
         if (is_resource($this->connection)) {
             $this->status = 2;
             return $this->auth ? $this->ehlo() : $this->helo();
         } else {
             log_write($errstr, __FILE__, __LINE__);
             $this->errors[] = 'Failed to connect to server: ' . $errstr;
             return false;
         }
     }
 }
开发者ID:dlpc,项目名称:ecshop,代码行数:29,代码来源:cls_smtp.php


示例3: email

function email()
{
    global $dir;
    //引入发送邮件类
    require $dir . "www/smtp.php";
    //使用163邮箱服务器
    $smtpserver = "smtp.exmail.qq.com";
    //163邮箱服务器端口
    $smtpserverport = 25;
    //你的163服务器邮箱账号
    $smtpusermail = "[email protected]";
    //收件人邮箱
    $smtpemailto = "xxxxxxxxxxqq.com";
    //你的邮箱账号(去掉@163.com)
    $smtpuser = "[email protected]";
    //SMTP服务器的用户帐号
    //你的邮箱密码
    $smtppass = "xxxx";
    //SMTP服务器的用户密码
    //邮件主题
    $mailsubject = "测试邮件发送";
    //邮件内容
    $mailbody = "PHP+MySQL";
    //邮件格式(HTML/TXT),TXT为文本邮件
    $mailtype = "TXT";
    //这里面的一个true是表示使用身份验证,否则不使用身份验证.
    $smtp = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass);
    //是否显示发送的调试信息
    $smtp->debug = false;
    //发送邮件
    $smtp->sendmail($smtpemailto, $smtpusermail, $mailsubject, $mailbody, $mailtype);
}
开发者ID:niweisi,项目名称:phpCommand,代码行数:32,代码来源:shell.php


示例4: sendEmail

 function sendEmail($email)
 {
     //此处的$email变量是发送的目的邮件
     //下面开始设置一些信息
     $smtpserver = "smtp.qq.com";
     //SMTP服务器
     $smtpserverport = 25;
     //SMTP服务器端口
     $smtpusermail = "[email protected]";
     //SMTP服务器的用户邮箱
     $smtpemailto = $email;
     //发送给谁(可以填写任何邮箱地址)
     $smtpuser = "1261810665";
     //SMTP服务器的用户帐号(即SMTP服务器的用户邮箱@前面的信息)
     $smtppass = "xxx(xxx代表[email protected]的密码)";
     //SMTP服务器的用户密码
     $mailtitle = 'UNeed';
     //邮件主题
     $mailcontent = "<h1>您成功发送了一条电子邮件</h1>";
     //邮件内容
     $mailtype = "HTML";
     //邮件格式(HTML/TXT),TXT为文本邮件
     $smtp = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass);
     //这里面的一个true是表示使用身份验证,否则不使用身份验证.
     $smtp->debug = false;
     //是否显示发送的调试信息
     $state = $smtp->sendmail($smtpemailto, $smtpusermail, $mailtitle, $mailcontent, $mailtype);
     if ($state == "") {
         echo "对不起,邮件发送失败!请检查邮箱填写是否有误。";
         exit;
     }
     echo "恭喜!邮件发送成功!!";
 }
开发者ID:WflytoC,项目名称:PHP_Classes,代码行数:33,代码来源:sendEmail.php


示例5: sendEmail

/**
 * Created by PhpStorm.
 * User: master
 * Date: 2016/3/2
 * Time: 20:57
 */
function sendEmail($addr, $title, $body)
{
    $smtpserver = "smtp.163.com";
    //SMTP服务器
    $smtpserverport = 25;
    //SMTP服务器端口,一般为25
    $smtpusermail = "[email protected]";
    //SMTP服务器的用户邮箱
    $smtpuser = "cotestpublic";
    //SMTP服务器的用户帐号
    $smtppass = "cotest123";
    //SMTP服务器的用户密码
    $smtp = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass);
    //实例化邮件类
    $emailtype = "HTML";
    //信件类型
    $smtpemailto = $addr;
    //接收邮件方
    $smtpemailfrom = $smtpusermail;
    //发送邮件方
    $emailsubject = $title;
    //邮件标题
    $smtp->debug = false;
    //邮件主体内容
    $emailbody = $body;
    //发送邮件
    $rs = $smtp->sendmail($smtpemailto, $smtpemailfrom, $emailsubject, $emailbody, $emailtype);
    if ($rs != "") {
        $rst = true;
    } else {
        $rst = false;
    }
    return $rst;
}
开发者ID:buaacotest,项目名称:cotest,代码行数:40,代码来源:lib_user.php


示例6: mail_notice

 function mail_notice()
 {
     //******************** 配置信息 ********************************
     $smtpserver = "smtp.qq.com";
     //SMTP服务器
     $smtpserverport = 25;
     //SMTP服务器端口
     $smtpusermail = "[email protected]";
     //SMTP服务器的用户邮箱
     $smtpemailto = '[email protected]';
     //发送给谁
     $smtpuser = "707719848";
     //SMTP服务器的用户帐号
     $smtppass = "lx19950712jiao";
     //SMTP服务器的用户密码
     $mailtitle = '学校数据更新完毕!';
     //邮件主题
     $mailcontent = "<h1>更新时间:" . date('Y-m-d h:i:sa') . "</h1>";
     //邮件内容
     $mailtype = "HTML";
     //邮件格式(HTML/TXT),TXT为文本邮件
     //************************ 配置信息 ****************************
     $smtp = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass);
     //这里面的一个true是表示使用身份验证,否则不使用身份验证.
     $smtp->debug = false;
     //是否显示发送的调试信息
     $state = $smtp->sendmail($smtpemailto, $smtpusermail, $mailtitle, $mailcontent, $mailtype);
     if ($state == '') {
         echo 'failed';
     }
 }
开发者ID:keensting,项目名称:ErhuoAmbass,代码行数:31,代码来源:import_school.php


示例7: array

  function &connect($params = array())
  {
    if (!isset($this->status))
    {
      $obj = new smtp($params);
      if ($obj->connect())
        $obj->status = SMTP_STATUS_CONNECTED;

      return $obj;
    }
    else
    {
      $this->connection = fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
      if (function_exists('socket_set_timeout'))
        @socket_set_timeout($this->connection, 5, 0);

      $greeting = $this->get_data();
      if (is_resource($this->connection))
        return $this->auth ? $this->ehlo() : $this->helo();
      else
      {
        $this->errors[] = 'Failed to connect to server: ' . $errstr;
        return false;
      }
    }
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:26,代码来源:smtp.class.php


示例8: SEND_MAIL

function SEND_MAIL()
{
    $main = new maincf_multi($_POST["hostname"]);
    $ipaddr = $main->ip_addr;
    include_once dirname(__FILE__) . "/ressources/smtp/smtp.php";
    $Parms["host"] = $ipaddr;
    $Parms["DonotResolvMX"] = true;
    $smtp = new smtp($Parms);
    $smtp->bindto = $_POST["TESTS-BIND"];
    $smtp->from = $_POST["TESTS-FROM"];
    $smtp->recipients = $_POST["TESTS-TO"];
    $f[] = "Return-Path: <{$_POST["TESTS-FROM"]}>";
    $f[] = "Subject: {$_POST["TESTS-SUB"]}";
    $f[] = "From: {$_POST["TESTS-FROM"]}";
    $f[] = "Sender: {$_POST["TESTS-FROM"]}";
    $f[] = "Reply-To: {$_POST["TESTS-FROM"]}";
    $f[] = "X-Sender: {$_POST["TESTS-FROM"]}";
    $f[] = "Envelope-To: {$_POST["TESTS-TO"]}";
    $smtp->headers = @implode("\n", $f);
    $smtp->body = $_POST["TESTS-BOD"];
    if (!$smtp->connect()) {
        echo "Instance {$_POST["hostname"]}\nIP: {$ipaddr}:25\n";
        echo @implode("\n", $smtp->errors);
        return;
    }
    if (!$smtp->send()) {
        echo @implode("\n", $smtp->errors);
        return;
    }
    echo @implode("\n", $smtp->errors);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:postfix.multi-tests.php


示例9: eSmtp

 function eSmtp($email)
 {
     //使用163邮箱服务器
     $smtpserver = "smtp.163.com";
     //163邮箱服务器端口
     $smtpserverport = 25;
     //你的163服务器邮箱账号
     $smtpusermail = "[email protected]";
     //收件人邮箱
     $smtpemailto = $email;
     //"[email protected]";
     //你的邮箱账号(去掉@163.com)
     $smtpuser = "yy_lfy";
     //SMTP服务器的用户帐号
     //你的邮箱密码
     $smtppass = "yueyi@810718";
     //SMTP服务器的用户密码
     //邮件主题
     $mailsubject = "测试邮件发送";
     //$mailsubject = '=?UTF-8?B?'.base64_encode($mailsubject).'?=';
     //邮件内容
     $mailbody = "<p>PHP+MySQL测试邮件发送</p><p><a href=\"http://baidu.com\">baidu</a>";
     //邮件格式(HTML/TXT),TXT为文本邮件
     $mailtype = "HTML";
     //这里面的一个true是表示使用身份验证,否则不使用身份验证.
     $smtp = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass);
     //是否显示发送的调试信息
     $smtp->debug = TRUE;
     //发送邮件
     $smtp->sendmail($smtpemailto, $smtpusermail, $mailsubject, $mailbody, $mailtype);
 }
开发者ID:ahmatjan,项目名称:iLearn_iSearch_API,代码行数:31,代码来源:testemail.php


示例10: sendmail

function sendmail($smtpemailto, $title, $content)
{
    $rs = mysql_fetch_array(mysql_query("select * from sitinfo where id = 1;"));
    $websmtp = $rs["websmtp"];
    $email = $rs["email"];
    $mailuser = $rs["mailuser"];
    $smtpport = $rs["smtpport"];
    $mailpassword = $rs["mailpassword"];
    $smtpserver = $websmtp;
    //SMTP服务器
    $smtpserverport = 25;
    //SMTP服务器端口
    $smtpusermail = $email;
    //SMTP服务器的用户邮箱
    $smtpemailto = $smtpemailto;
    //发送给谁
    $smtpuser = $mailuser;
    //SMTP服务器的用户帐号
    $smtppass = $mailpassword;
    //SMTP服务器的用户密码
    $mailsubject = $title;
    //邮件主题
    $mailbody = $content;
    //邮件内容
    $mailtype = "HTML";
    $smtp = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass);
    $smtp->debug = false;
    //是否显示发送的调试信息
    $smtp->sendmail($smtpemailto, $smtpusermail, $mailsubject, $mailbody, $mailtype);
}
开发者ID:wuleiyang,项目名称:SublimeText,代码行数:30,代码来源:email.php++++++++++++++++D%3A%5CProgram+Files%5CFlashFXP%5CCache%5C%7Eflashfxp%5C52C220D5_edit.tmp%5Cemail.php


示例11: send_email

/**
*$to_email 发送的人
*$title  邮箱标题
*$content 有些内容
*/
function send_email($to_email, $title, $content)
{
    require_once "email.class.php";
    //##########################################
    $smtpserver = "smtp.163.com";
    //SMTP服务器
    $smtpserverport = "25";
    //SMTP服务器端口
    $smtpusermail = "[email protected]";
    //SMTP服务器的用户邮箱
    $smtpemailto = $to_email;
    //发送给谁
    $smtpuser = "[email protected]";
    //SMTP服务器的用户帐号
    $smtppass = "userpeng123";
    //SMTP服务器的用户密码
    $mailsubject = iconv("UTF-8", "gbk", $title);
    //邮件主题
    $mailbody = iconv("UTF-8", "gbk", $content);
    //邮件内容
    $mailtype = "HTML";
    //邮件格式(HTML/TXT),TXT为文本邮件
    ##########################################
    $smtp = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass);
    //这里面的一个true是表示使用身份验证,否则不使用身份验证.
    $smtp->debug = false;
    //是否显示发送的调试信息
    $smtp->sendmail($smtpemailto, $smtpusermail, $mailsubject, $mailbody, $mailtype);
}
开发者ID:norain2050,项目名称:hkgbf,代码行数:34,代码来源:send.php


示例12: mail_core

function mail_core($smtpemailto, $mailtitle, $mailcontent, $mailtype)
{
    $smtp = new smtp($GLOBALS["smtpserver"], $GLOBALS["smtpserverport"], true, $GLOBALS["smtpuser"], $GLOBALS["smtppass"]);
    //这里面的一个true是表示使用身份验证,否则不使用身份验证.
    $smtp->debug = false;
    //是否显示发送的调试信息
    $state = $smtp->sendmail($smtpemailto, $GLOBALS["smtpusermail"], $mailtitle, $mailcontent, $mailtype);
    return $state;
}
开发者ID:marche147,项目名称:nsc-website,代码行数:9,代码来源:email.php


示例13: password

    public function password()
    {
        if (!IS_POST) {
            _404("页面不存在");
        }
        $email = I('username', '', 'htmlspecialchars');
        if (I("verify", "", "md5") != session("verify")) {
            //验证码错误;
            $this->ajaxReturn(array('status' => 2));
            return 0;
        } else {
            // $this->ajaxReturn(array('status'=>1));//发送成功!
            import('Class.smtp', APP_PATH);
            date_default_timezone_set('Asia/Shanghai');
            $time = time();
            $appy_time = date('Y-m-d H:i', $time);
            $data = M();
            $sql = "select id from dm_user where username= '{$email}'";
            $result = $data->query("select id from dm_user where username= '{$email}'");
            $reset = $data->query("update dm_user set resettime={$time} where username ='{$email}'");
            $id = base64_encode($result[0]['id']);
            //使用base64对数据加密
            $url = U('index/Password/reset?time=' . $time . '&yxs=' . $id . '&mail=' . $email);
            $MailServer = 'smtp.163.com';
            //SMTP 服务器
            $MailPort = '25';
            //SMTP服务器端口号 默认25
            $MailId = '[email protected]';
            //服务器邮箱帐号
            $MailPw = 'checent.com';
            //服务器邮箱密码
            $Title = '呆萌网找回登陆密码!';
            //邮件标题
            $Content = '呆萌网在 ' . $appy_time . ' 收到了邮箱 ' . $email . ' 的密码重置申请。请点击以下的链接修改密码:
				</br>
				http://' . $_SERVER['HTTP_HOST'] . $url . '
				</br>
				如果邮箱中不能打开链接,您也可以将它复制到浏览器地址栏中打开。';
            //邮件内容
            $email = $email;
            //接收者邮箱
            $smtp = new smtp($MailServer, $MailPort, true, $MailId, $MailPw);
            $smtp->debug = false;
            if ($smtp->sendmail($email, $MailId, $Title, $Content, "HTML")) {
                $this->ajaxReturn(array('status' => 1));
                //发送成功!
            } else {
                $this->ajaxReturn(array('status' => 3));
                //请重新发送
            }
        }
    }
开发者ID:CreateBigChange,项目名称:daymeng,代码行数:52,代码来源:PasswordAction.class.php


示例14: sendmail

/**
 *  邮件发送函数
 *
 * @param     string  $email  E-mail地址
 * @param     string  $mailtitle  E-mail标题
 * @param     string  $mailbody  E-mail内容
 * @param     string  $headers 头信息
 * @return    void
 */
function sendmail($email, $mailtitle, $mailbody, $headers)
{
    global $cfg_sendmail_bysmtp, $cfg_smtp_server, $cfg_smtp_port, $cfg_smtp_usermail, $cfg_smtp_user, $cfg_smtp_password, $cfg_adminemail;
    if ($cfg_sendmail_bysmtp == 'Y') {
        $mailtype = 'TXT';
        require_once DEDEINC . '/mail.class.php';
        $smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password);
        $smtp->debug = false;
        $smtp->sendmail($email, $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype);
    } else {
        @mail($email, $mailtitle, $mailbody, $headers);
    }
}
开发者ID:Miliup,项目名称:miliofficeweb,代码行数:22,代码来源:inc_pwd_functions.php


示例15: sendEmail

 function sendEmail()
 {
     $smtp = new smtp($this->smtpserver, $this->smtpserverport, true, $this->smtpuser, $this->smtppass);
     //这里面的一个true是表示使用身份验证,否则不使用身份验证.
     $smtp->debug = false;
     //是否显示发送的调试信息
     $state = $smtp->sendmail($this->smtpemailto, $this->smtpusermail, $this->mailtitle, $this->mailcontent, $this->mailtype);
     echo "<div style='width:300px; margin:36px auto;'>";
     if ($state == "") {
         return false;
     } else {
         return true;
     }
 }
开发者ID:huzhiming12,项目名称:itil,代码行数:14,代码来源:SendEmail.php


示例16: sendmail

 public function sendmail()
 {
     //include_once(ROOT_PATH."/application/controllers/mail.inc.php");
     $smtp = new smtp("smtp.163.com", 25, true, "[email protected]", "mxanahtmyfukwgxa", "[email protected]");
     //发件人信箱信息
     $smtp->debug = TRUE;
     //是否显示发送的调试信息 FALSE or TRUE
     $mailto = "[email protected]";
     //收件人信箱
     $mailsubject = "Feedback";
     $mailfrom = "Acemap user";
     $mailbody = "Name:" . $_POST["q1"] . "<br>";
     $mailbody = $mailbody . "Phone No:" . $_POST["q2"] . "<br>";
     $mailbody = $mailbody . "Suburb:" . $_POST["q3"] . "<br>";
     $mailbody = $mailbody . "Email:" . $_POST["email"] . "<br>";
     $mailbody = $mailbody . "Message:" . $_POST["q4"] . "<br>";
     //其他的表单项目以此类推
     $mailtype = "HTML";
     //邮件格式(HTML/TXT),TXT为文本邮件
     $mailsubject = '=?UTF-8?B?' . base64_encode($mailsubject) . '?=';
     //邮件主题
     $mailfrom = '=?UTF-8?B?' . base64_encode($mailfrom) . '?=';
     //发件人
     $smtp->sendmail($mailto, $mailfrom, $mailsubject, $mailbody, $mailtype);
     echo "<script language=\"JavaScript\">alert(\"Send success.\");</script>";
     echo "<script language=\"JavaScript\">history.go(-1);</script>";
     exit;
     /*
             $this->load->library('email');
     
             $config['smtp_host']='smtp.163.com';
             $config['smtp_post']='25';
             $config['smtp_user']='[email protected]';
             $config['smtp_pass']='mxanahtmyfukwgxa';
     
             $this->email->initialize($config);
     
             $this->email->from("[email protected]","acemap");
             $this->email->to('[email protected]');
     
             $this->email->subject('Email Test');
             $this->email->message('Testing the email class.');
     
             $this->email->send();
     
             echo $this->email->print_debugger();
     */
 }
开发者ID:rozentill,项目名称:acerec_website,代码行数:48,代码来源:feedback.php


示例17: sendServiceMail

function sendServiceMail($weChartPost)
{
    //******************** 配置信息 ********************************
    $smtpserver = constant('SMTP_SERVER');
    //SMTP服务器
    $smtpserverport = constant('SMTP_SERVER_PORT');
    //SMTP服务器端口
    $smtpusermail = constant('SMTP_USER_MAIL');
    //SMTP服务器的用户邮箱
    $smtpemailto = constant('SERVICE_MAIL');
    //发送给谁
    $smtpuser = constant('SMTP_USER');
    //SMTP服务器的用户帐号
    $smtppass = constant('SMTP_PASS');
    //SMTP服务器的用户密码
    $mailtitle = '我在照相馆预约信息';
    //邮件主题
    //$mailcontent = json_encode($weChartPost);//邮件内容
    $mailcontent = getContent($weChartPost);
    $mailtype = constant('MAIL_TYPE');
    //邮件格式(HTML/TXT),TXT为文本邮件
    //************************ 配置信息 ****************************
    $smtp = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass);
    //这里面的一个true是表示使用身份验证,否则不使用身份验证.
    $smtp->debug = false;
    //是否显示发送的调试信息
    $state = $smtp->sendmail($smtpemailto, $smtpusermail, $mailtitle, $mailcontent, $mailtype);
    if ($state == "") {
        return $state;
    }
    return "OK";
}
开发者ID:CodingJason,项目名称:totemvision,代码行数:32,代码来源:appointmentFormPost.php


示例18: sendmail

 function sendmail($email, $mailtitle, $mailbody)
 {
     global $cfg_sendmail_bysmtp, $cfg_smtp_server, $cfg_smtp_port, $cfg_smtp_usermail, $cfg_smtp_user, $cfg_smtp_password, $cfg_adminemail, $cfg_webname;
     if ($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) {
         $mailtype = 'HTML';
         require_once DEDEINC . '/mail.class.php';
         $smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password);
         $smtp->debug = false;
         if (!$smtp->smtp_sockopen($cfg_smtp_server)) {
             ShowMsg('邮件发送失败,请联系管理员', '-1');
             exit;
         }
         $smtp->sendmail($email, $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype);
     } else {
         @mail($email, $mailtitle, $mailbody, $headers);
     }
 }
开发者ID:iabing,项目名称:mzzyc,代码行数:17,代码来源:mail_title_send.php


示例19: send

 public function send()
 {
     $proxy_url = trim(get_option('ext_function_mail_proxy'));
     $proxy_key = trim(get_option('ext_function_mail_proxy_key'));
     if ($proxy_url && $proxy_key) {
         return $this->proxySend($proxy_url, $proxy_key);
     }
     if (!$this->flag) {
         $smtp = new smtp($this->smtpserver, $this->smtpserverport, true, $this->smtpuser, $this->smtppass);
         //这里面的一个true是表示使用身份验证,否则不使用身份验证.
         //$smtp->debug = TRUE;     //是否显示发送的调试信息
         $status = $smtp->sendmail($this->smtpemailto, $this->smtpusermail, $this->mailsubject, $this->mailbody, $this->mailtype);
         return $status;
     } else {
         $headers = "From: {$this->smtpusermail}";
         return mail($this->smtpemailto, $this->mailsubject, $this->mailbody, $headers);
     }
 }
开发者ID:isonz,项目名称:hantanghongmu_v1,代码行数:18,代码来源:sMail.php


示例20: send

 public function send($emailto, $tiele, $content)
 {
     $smtp = new smtp($this->server, $this->port, true, $this->user, $this->pass);
     //关闭调试信息
     $smtp->debug = true;
     //发送邮件
     $state = $smtp->sendmail($emailto, $this->user, $tiele, $content, $this->mail_type);
     //检查发送状态
     if ($state == "") {
         return "邮件发送失败,请检查密码或其他设置";
     } else {
         if (strlen($state) != 0) {
             //发送成功
             return "邮件发送成功";
         } else {
             return "未知错误";
         }
     }
 }
开发者ID:geeyu,项目名称:wizmail,代码行数:19,代码来源:sendmail.php



注:本文中的smtp类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP soap_parser类代码示例发布时间:2022-05-23
下一篇:
PHP sms类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap