久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='hrn8c'></bdo><ul id='hrn8c'></ul>
      <i id='hrn8c'><tr id='hrn8c'><dt id='hrn8c'><q id='hrn8c'><span id='hrn8c'><b id='hrn8c'><form id='hrn8c'><ins id='hrn8c'></ins><ul id='hrn8c'></ul><sub id='hrn8c'></sub></form><legend id='hrn8c'></legend><bdo id='hrn8c'><pre id='hrn8c'><center id='hrn8c'></center></pre></bdo></b><th id='hrn8c'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='hrn8c'><tfoot id='hrn8c'></tfoot><dl id='hrn8c'><fieldset id='hrn8c'></fieldset></dl></div>

      <small id='hrn8c'></small><noframes id='hrn8c'>

      <legend id='hrn8c'><style id='hrn8c'><dir id='hrn8c'><q id='hrn8c'></q></dir></style></legend>
      <tfoot id='hrn8c'></tfoot>

      使用 Zend Mail 發(fā)送郵件時(shí)出現(xiàn)問(wèn)題?

      Problem when sending mail with Zend Mail?(使用 Zend Mail 發(fā)送郵件時(shí)出現(xiàn)問(wèn)題?)
    1. <legend id='m928T'><style id='m928T'><dir id='m928T'><q id='m928T'></q></dir></style></legend>

        <small id='m928T'></small><noframes id='m928T'>

        <i id='m928T'><tr id='m928T'><dt id='m928T'><q id='m928T'><span id='m928T'><b id='m928T'><form id='m928T'><ins id='m928T'></ins><ul id='m928T'></ul><sub id='m928T'></sub></form><legend id='m928T'></legend><bdo id='m928T'><pre id='m928T'><center id='m928T'></center></pre></bdo></b><th id='m928T'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='m928T'><tfoot id='m928T'></tfoot><dl id='m928T'><fieldset id='m928T'></fieldset></dl></div>
        <tfoot id='m928T'></tfoot>

              <bdo id='m928T'></bdo><ul id='m928T'></ul>
                <tbody id='m928T'></tbody>
              • 本文介紹了使用 Zend Mail 發(fā)送郵件時(shí)出現(xiàn)問(wèn)題?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                問(wèn)題描述

                我正在嘗試使用 ZendMail 發(fā)送電子郵件(這個(gè)簡(jiǎn)單的腳本總結(jié)了它)

                setBodyText('My Nice Test Text');$mail->setBodyHtml('My Nice Test Text');$mail->setFrom('test@example.com', 'Mr Example');$mail->addTo('contact@mypage.com', 'Mr Test');$mail->setSubject('TestSubject');$mail->send();?>

                但是我得到了這個(gè)堆棧跟蹤:

                致命錯(cuò)誤:未捕獲的異常Zend_Mail_Transport_Exception"帶有消息無(wú)法發(fā)送郵件".' 在/usr/share/php/libzend-framework-php/Zend/Mail/Transport/Sendmail.php:137堆棧跟蹤:#0/usr/share/php/libzend-framework-php/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()#1/usr/share/php/libzend-framework-php/Zend/Mail.php(1178): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))#2/var/www/hexreaction/mail/index2.php(11): Zend_Mail->send()#3 {main} 在第 137 行的/usr/share/php/libzend-framework-php/Zend/Mail/Transport/Sendmail.php 中拋出

                我沒(méi)有嘗試使用 SMTP 來(lái)發(fā)送我的電子郵件,而且我遇到的問(wèn)題不那么嚴(yán)重,但仍然是一個(gè)問(wèn)題.

                 '登錄','用戶名' =>'contact@mypage.com','密碼' =>'秘密通行證');$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config);$mail = new Zend_Mail();$mail->setBodyText('這是郵件的正文.');$mail->setFrom('contact@mypage.com', 'Some Sender');$mail->addTo('contact@mypage.com', '某些收件人');$mail->setSubject('TestSubject');$mail->send($transport);?>

                這個(gè)錯(cuò)誤是這個(gè)錯(cuò)誤,我真的不明白為什么:

                致命錯(cuò)誤:在第 7 行的/var/www/hexreaction/mail/index3.php 中找不到Zend_Mail_Transport_Smtp"類(lèi)

                編輯 2:

                這是我最終的工作代碼

                require_once('Zend/Mail/Transport/Smtp.php');require_once 'Zend/Mail.php';$config = array('auth' => '登錄','用戶名' =>'somemail@mysite.com','密碼' =>'somepass','ssl' =>'tls');$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config);$mail = new Zend_Mail();$mail->setBodyText('這是郵件的正文.');$mail->setFrom('somemail@mysite.com', 'Some Sender');$mail->addTo('somemail@mysite.com', '某些收件人');$mail->setSubject('TestSubject');$mail->send($transport);

                解決方案

                正如您在堆棧跟蹤中所見(jiàn),Zend_Mail 使用 Zend_Mail_Transport_Sendmail 作為傳輸適配器.
                因此,請(qǐng)確保您的系統(tǒng)上正在運(yùn)行與 sendmail 兼容的 MTA(例如 Postfix).>

                作為替代,您可以使用 Zend_Mail_Transport_Smtp 傳輸適配器并像這樣使用外部 SMTP 服務(wù)器

                $tr = new Zend_Mail_Transport_Smtp('mail.example.com', array('認(rèn)證' =>'登錄','用戶名' =>$用戶名,'密碼' =>$密碼,'端口' =>$端口,));Zend_Mail::setDefaultTransport($tr);

                對(duì)于您的第二個(gè)問(wèn)題:a

                require_once('Zend/Mail/Transport/Smtp.php');

                應(yīng)該有幫助.

                I'm trying to send an e-mail with ZendMail ( this simple script sums it up )

                <?php
                require_once 'Zend/Mail.php';
                
                $mail = new Zend_Mail();
                $mail->setBodyText('My Nice Test Text');
                $mail->setBodyHtml('My Nice Test Text');
                $mail->setFrom('test@example.com', 'Mr Example');
                $mail->addTo('contact@mypage.com', 'Mr Test');
                $mail->setSubject('TestSubject');
                $mail->send();
                ?>
                

                However I get this stack trace:

                Fatal error:
                Uncaught exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. ' in /usr/share/php/libzend-framework-php/Zend/Mail/Transport/Sendmail.php:137
                
                Stack trace:
                #0 /usr/share/php/libzend-framework-php/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
                #1 /usr/share/php/libzend-framework-php/Zend/Mail.php(1178): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
                #2 /var/www/hexreaction/mail/index2.php(11): Zend_Mail->send()
                #3 {main} thrown in /usr/share/php/libzend-framework-php/Zend/Mail/Transport/Sendmail.php on line 137
                

                EDIT:

                I'm not trying to use SMTP to send my e-mail and I'm having a less horrible problem, but still a problem.

                <?php
                require_once 'Zend/Mail.php';
                $config = array('auth' => 'login',
                                'username' => 'contact@mypage.com',
                                'password' => 'secretpass');
                
                $transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config);
                
                $mail = new Zend_Mail();
                $mail->setBodyText('This is the text of the mail.');
                $mail->setFrom('contact@mypage.com', 'Some Sender');
                $mail->addTo('contact@mypage.com', 'Some Recipient');
                $mail->setSubject('TestSubject');
                $mail->send($transport);
                ?>
                

                This throw's this error, I don't really get why:

                Fatal error:
                Class 'Zend_Mail_Transport_Smtp' not found in /var/www/hexreaction/mail/index3.php on line 7
                

                EDIT 2:

                This is my final working code

                require_once('Zend/Mail/Transport/Smtp.php');
                require_once 'Zend/Mail.php';
                $config = array('auth' => 'login',
                                'username' => 'somemail@mysite.com',
                                'password' => 'somepass',
                                'ssl' => 'tls');
                
                $transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config);
                
                $mail = new Zend_Mail();
                $mail->setBodyText('This is the text of the mail.');
                $mail->setFrom('somemail@mysite.com', 'Some Sender');
                $mail->addTo('somemail@mysite.com', 'Some Recipient');
                $mail->setSubject('TestSubject');
                $mail->send($transport);
                

                解決方案

                As you can see in the Stack trace Zend_Mail uses Zend_Mail_Transport_Sendmail as transport adapter.
                So make sure a sendmail-compatible MTA (e.g. Postfix) is running on your system.

                As an alternative you could use the Zend_Mail_Transport_Smtp transport adapter and use an external SMTP-Server like so

                $tr = new Zend_Mail_Transport_Smtp('mail.example.com', array(
                    'auth'     => 'login',
                    'username' => $username,
                    'password' => $password,
                    'port'     => $port,
                ));
                Zend_Mail::setDefaultTransport($tr);
                

                Edit: For your 2nd Problem: a

                require_once('Zend/Mail/Transport/Smtp.php');

                should help.

                這篇關(guān)于使用 Zend Mail 發(fā)送郵件時(shí)出現(xiàn)問(wèn)題?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動(dòng)游標(biāo)不起作用)
                PHP PDO ODBC connection(PHP PDO ODBC 連接)
                Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個(gè)值;等于變量的值)
                MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動(dòng)程序)
                <tfoot id='2sKAC'></tfoot>
                <i id='2sKAC'><tr id='2sKAC'><dt id='2sKAC'><q id='2sKAC'><span id='2sKAC'><b id='2sKAC'><form id='2sKAC'><ins id='2sKAC'></ins><ul id='2sKAC'></ul><sub id='2sKAC'></sub></form><legend id='2sKAC'></legend><bdo id='2sKAC'><pre id='2sKAC'><center id='2sKAC'></center></pre></bdo></b><th id='2sKAC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2sKAC'><tfoot id='2sKAC'></tfoot><dl id='2sKAC'><fieldset id='2sKAC'></fieldset></dl></div>

                      1. <legend id='2sKAC'><style id='2sKAC'><dir id='2sKAC'><q id='2sKAC'></q></dir></style></legend>
                          <tbody id='2sKAC'></tbody>
                      2. <small id='2sKAC'></small><noframes id='2sKAC'>

                          <bdo id='2sKAC'></bdo><ul id='2sKAC'></ul>
                          主站蜘蛛池模板: 中文字幕日韩一区 | 2021天天躁夜夜看 | 日韩色图视频 | 亚洲国产精品区 | 青青久草 | 在线精品一区二区 | 人成久久| 亚洲免费精品一区 | 亚洲aⅴ| 麻豆视频在线免费看 | 色.com| 中文字幕在线观看一区 | 欧美一区二区三区在线看 | 美女国内精品自产拍在线播放 | 欧美在线色视频 | 精品国产乱码久久久久久牛牛 | 午夜视频网站 | 国产精品毛片av | 好姑娘影视在线观看高清 | 日日草夜夜草 | 欧美一区二区成人 | 五月香婷婷| 国产精品色一区二区三区 | 在线观看国产视频 | 99re在线视频免费观看 | 麻豆久久久久久 | 美女黄网站 | 91精品国产高清一区二区三区 | 久久人人网| www.伊人.com | 亚洲成人一区二区在线 | 亚洲啊v| 国产欧美精品一区二区三区 | 免费av观看 | 亚洲视频一 | 干一干操一操 | 欧美精品一区二区三区四区五区 | 日韩欧美精品一区 | 国产成人精品一区二区三区在线观看 | 欧美黄在线观看 | 亚洲国产一区在线 |