Добавлено: 31 авг 2015, 14:35
GeekHacker,А можно попросить настройки smtp от yandex
[upd=1441021956][/upd]
Всем спасибо за помощь ! Заработало на яндексе
[upd=1441021956][/upd]
Всем спасибо за помощь ! Заработало на яндексе
2015-09-22 18:32:51 2015-09-22 18:32:51 Debug: Connecting to smtp.gmail.com:465 2015-09-22 18:32:52 Debug: Connected. 2015-09-22 18:32:52 Client <-- Server: 220 smtp.gmail.com ESMTP i6sm2415225wjw.43 - gsmtp<EOL> 2015-09-22 18:32:52 Client --> Server: EHLO OpenServer<EOL> 2015-09-22 18:32:52 Client <-- Server: 250-smtp.gmail.com at your service, [109.87.165.200]<EOL>250-SIZE 35882577<EOL>250-8BITMIME<EOL>250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN XOAUTH<EOL>250-ENHANCEDSTATUSCODES<EOL>250-PIPELINING<EOL>250-CHUNKING<EOL>250 SMTPUTF8<EOL> 2015-09-22 18:32:52 Debug: Authenticating as away4people@gmail.com 2015-09-22 18:32:52 Client --> Server: AUTH LOGIN<EOL> 2015-09-22 18:32:52 Client <-- Server: 334 VXNlcm5hbWU6<EOL> 2015-09-22 18:32:52 Client --> Server: YXdheTRwZW9wbGVAZ21haWwuY29t<EOL> 2015-09-22 18:32:52 Client <-- Server: 334 UGFzc3dvcmQ6<EOL> 2015-09-22 18:32:52 Client --> Server: MXdkdjJlZmI=<EOL> 2015-09-22 18:32:52 Client <-- Server: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbvIc<EOL>534-5.7.14 8DnEwR9UiYtzqtd2FbLLQJR2SknO0qmA7Hba9BiTrRTyiqf7PO_wDKytuXne4pPbDy5ITk<EOL>534-5.7.14 ck2PgmNaybkzTmaB9sWeLmaiRVjQ8uo4AmTRBG-uRhK5P9M-Ch_5cCxLO0PRp6xgo_lmBB<EOL>534-5.7.14 mGiZrWyJCy_wdQKlmgHzvMkuBgisG_m1DjRMKPaixh_HAmvJTYYCnL9vsFxf0QmrNLM5TK<EOL>534-5.7.14 KF3CgcVAkFswRxSrkUocP3ubjmPg> Please log in via your web browser and<EOL>534-5.7.14 then try again.<EOL>534-5.7.14 Learn more at<EOL>534 5.7.14 https://support.google.com/mail/answer/78754 i6sm2415225wjw.43 - gsmtp<EOL> 2015-09-22 18:32:52 Debug: Disconnecting from smtp.gmail.com:465 2015-09-22 18:32:52 Debug: Disconnected. 2015-09-22 18:32:52 Debug: Disconnected. 2015-09-22 18:32:52 Debug: <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbvIc 8DnEwR9UiYtzqtd2FbLLQJR2SknO0qmA7Hba9BiTrRTyiqf7PO_wDKytuXne4pPbDy5ITk ck2PgmNaybkzTmaB9sWeLmaiRVjQ8uo4AmTRBG-uRhK5P9M-Ch_5cCxLO0PRp6xgo_lmBB mGiZrWyJCy_wdQKlmgHzvMkuBgisG_m1DjRMKPaixh_HAmvJTYYCnL9vsFxf0QmrNLM5TK KF3CgcVAkFswRxSrkUocP3ubjmPg> Please log in via your web browser and then try again. Learn more at https://support.google.com/mail/answer/78754 i6sm2415225wjw.43 - gsmtp
$email = new PHPMailer();
$email->Subject = 'Pelnomocnictwo do opinii starosty';
$email->AddAddress( 'away4people@gmail.com' );
$file_to_attach = '../../templates/breko/Pelnomocnictwo do opinii starosty.docx';
$email->AddAttachment($file_to_attach);
return $email->Send();
В настройках Openserver'а следующее:
Ну раз не поняли, то лучше отложите работу с почтой до лучших времен, когда наступит пониманиеaway4people писал(а):А причем здесь ошибка авторизации? Не понял)
2015-09-22 19:17:30
2015-09-22 19:17:30 Debug: Connecting to smtp.gmail.com:465
2015-09-22 19:17:30 Debug: Connected.
2015-09-22 19:17:30 Client <-- Server: 220 smtp.gmail.com ESMTP ft3sm3903225wib.17 - gsmtp<EOL>
2015-09-22 19:17:30 Client --> Server: EHLO OpenServer<EOL>
2015-09-22 19:17:30 Client <-- Server: 250-smtp.gmail.com at your service, [109.87.165.200]<EOL>250-SIZE 35882577<EOL>250-8BITMIME<EOL>250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN XOAUTH OAUTHBEARER<EOL>250-ENHANCEDSTATUSCODES<EOL>250-PIPELINING<EOL>250-CHUNKING<EOL>250 SMTPUTF8<EOL>
2015-09-22 19:17:30 Debug: Authenticating as away4people@gmail.com
2015-09-22 19:17:30 Client --> Server: AUTH LOGIN<EOL>
2015-09-22 19:17:30 Client <-- Server: 334 VXNlcm5hbWU6<EOL>
2015-09-22 19:17:30 Client --> Server: YXdheTRwZW9wbGVAZ21haWwuY29t<EOL>
2015-09-22 19:17:30 Client <-- Server: 334 UGFzc3dvcmQ6<EOL>
2015-09-22 19:17:30 Client --> Server: MXdkdjJlZmI=<EOL>
2015-09-22 19:17:31 Client <-- Server: 235 2.7.0 Accepted<EOL>
2015-09-22 19:17:31 Client --> Server: MAIL FROM: <system@apatris.pl><EOL>
2015-09-22 19:17:31 Client <-- Server: 250 2.1.0 OK ft3sm3903225wib.17 - gsmtp<EOL>
2015-09-22 19:17:31 Client --> Server: RCPT TO: <system@apatris.pl><EOL>
2015-09-22 19:17:31 Client <-- Server: 250 2.1.5 OK ft3sm3903225wib.17 - gsmtp<EOL>
2015-09-22 19:17:31 Client --> Server: DATA<EOL>
2015-09-22 19:17:31 Client <-- Server: 354 Go ahead ft3sm3903225wib.17 - gsmtp<EOL>
2015-09-22 19:17:31 Client --> Server: Date: Tue, 22 Sep 2015 19:17:31 +0300<EOL>
2015-09-22 19:17:31 Client --> Server: From: <system@apatris.pl><EOL>
2015-09-22 19:17:31 Client --> Server: To: system@apatris.pl<EOL>
2015-09-22 19:17:31 Client --> Server: Subject: Pełnomocnictwo do opinii starosty<EOL>
2015-09-22 19:17:31 Client --> Server: X-PHP-Originating-Script: 0:clientMayorOpinions.php<EOL>
2015-09-22 19:17:31 Client --> Server: <EOL>
2015-09-22 19:17:31 Client --> Server: MIME-Version: 1.0<EOL>
2015-09-22 19:17:31 Client --> Server: Content-Location:<EOL>
2015-09-22 19:17:31 Client --> Server: Content-Transfer-Encoding: quoted-printable<EOL>
2015-09-22 19:17:31 Client --> Server: Content-Type: text/html; charset="windows-1251"<EOL>
2015-09-22 19:17:31 Client --> Server: <EOL>
2015-09-22 19:17:31 Client --> Server: <html xmlns:o=3D"urn:schemas-microsoft-com:office:office"<EOL>
2015-09-22 19:17:31 Client --> Server: xmlns:w=3D"urn:schemas-microsoft-com:office:word"<EOL>
2015-09-22 19:17:31 Client --> Server: xmlns=3D"http://www.w3.org/TR/REC-html40"><EOL>
2015-09-22 19:17:31 Client --> Server: <EOL>
2015-09-22 19:17:31 Client --> Server: <head><EOL>
2015-09-22 19:17:31 Client --> Server: <meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dwindows-1251"><EOL>
2015-09-22 19:17:31 Client --> Server: <meta name=3DProgId content=3DWord.Document><EOL>
2015-09-22 19:17:31 Client --> Server: <meta name=3DGenerator content=3D"Microsoft Word 11"><EOL>
2015-09-22 19:17:31 Client --> Server: <meta name=3DOriginator content=3D"Microsoft Word 11"><EOL>
2015-09-22 19:17:31 Client --> Server: <link rel=3DFile-List href=3D"test.files/filelist.xml"><EOL>
2015-09-22 19:17:31 Client --> Server: <!--[if gte mso 9]><xml><EOL>
2015-09-22 19:17:31 Client --> Server: <w:WordDocument><EOL>
2015-09-22 19:17:31 Client --> Server: <w:View>Print</w:View><EOL>
2015-09-22 19:17:31 Client --> Server: <w:GrammarState>Clean</w:GrammarState><EOL>
2015-09-22 19:17:31 Client --> Server: <w:ValidateAgainstSchemas/><EOL>
2015-09-22 19:17:31 Client --> Server: <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><EOL>
2015-09-22 19:17:31 Client --> Server: <w:IgnoreMixedContent>false</w:IgnoreMixedContent><EOL>
2015-09-22 19:17:31 Client --> Server: <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><EOL>
2015-09-22 19:17:31 Client --> Server: <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><EOL>
2015-09-22 19:17:31 Client --> Server: </w:WordDocument><EOL>
2015-09-22 19:17:31 Client --> Server: </xml><![endif]--><!--[if gte mso 9]><xml><EOL>
2015-09-22 19:17:31 Client --> Server: <w:LatentStyles DefLockedState=3D"false" LatentStyleCount=3D"156"><EOL>
2015-09-22 19:17:31 Client --> Server: </w:LatentStyles><EOL>
2015-09-22 19:17:31 Client --> Server: </xml><![endif]--><EOL>
2015-09-22 19:17:31 Client --> Server: <style><EOL>
2015-09-22 19:17:31 Client --> Server: <!--<EOL>
2015-09-22 19:17:31 Client --> Server: /* Style Definitions */<EOL>
2015-09-22 19:17:31 Client --> Server: p.MsoNormal, li.MsoNormal, div.MsoNormal<EOL>
2015-09-22 19:17:31 Client --> Server: {mso-style-parent:"";<EOL>
2015-09-22 19:17:31 Client --> Server: margin:0cm;<EOL>
2015-09-22 19:17:31 Client --> Server: margin-bottom:.0001pt;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-pagination:widow-orphan;<EOL>
2015-09-22 19:17:31 Client --> Server: font-size:12.0pt;<EOL>
2015-09-22 19:17:31 Client --> Server: font-family:"Tahoma";<EOL>
2015-09-22 19:17:31 Client --> Server: mso-fareast-font-family:"Tahoma";}<EOL>
2015-09-22 19:17:31 Client --> Server: @page Section1<EOL>
2015-09-22 19:17:31 Client --> Server: {size:595.3pt 841.9pt;<EOL>
2015-09-22 19:17:31 Client --> Server: margin:18.0pt 19.3pt 18.0pt 18.0pt;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-header-margin:35.4pt;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-footer-margin:35.4pt;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-paper-source:0;}<EOL>
2015-09-22 19:17:31 Client --> Server: div.Section1<EOL>
2015-09-22 19:17:31 Client --> Server: {page:Section1;}<EOL>
2015-09-22 19:17:31 Client --> Server: --><EOL>
2015-09-22 19:17:31 Client --> Server: </style><EOL>
2015-09-22 19:17:31 Client --> Server: <!--[if gte mso 10]><EOL>
2015-09-22 19:17:31 Client --> Server: <style><EOL>
2015-09-22 19:17:31 Client --> Server: /* Style Definitions */<EOL>
2015-09-22 19:17:31 Client --> Server: table.MsoNormalTable<EOL>
2015-09-22 19:17:31 Client --> Server: {mso-style-name:"\041E\0431\044B\0447\043D\0430\044F \0442\0430\0431\043B\=<EOL>
2015-09-22 19:17:31 Client --> Server: 0438\0446\0430";<EOL>
2015-09-22 19:17:31 Client --> Server: mso-tstyle-rowband-size:0;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-tstyle-colband-size:0;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-style-noshow:yes;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-style-parent:"";<EOL>
2015-09-22 19:17:31 Client --> Server: mso-padding-alt:0cm 5.4pt 0cm 5.4pt;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-para-margin:0cm;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-para-margin-bottom:.0001pt;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-pagination:widow-orphan;<EOL>
2015-09-22 19:17:31 Client --> Server: font-size:10.0pt;<EOL>
2015-09-22 19:17:31 Client --> Server: font-family:"Tahoma";<EOL>
2015-09-22 19:17:31 Client --> Server: mso-ansi-language:#0400;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-fareast-language:#0400;<EOL>
2015-09-22 19:17:31 Client --> Server: mso-bidi-language:#0400;<EOL>
2015-09-22 19:17:31 Client --> Server: width:100%;<EOL>
2015-09-22 19:17:31 Client --> Server: }<EOL>
2015-09-22 19:17:31 Client --> Server: <EOL>
2015-09-22 19:17:31 Client --> Server: td.br1{<EOL>
2015-09-22 19:17:31 Client --> Server: border:1px solid black;<EOL>
2015-09-22 19:17:31 Client --> Server: }<EOL>
2015-09-22 19:17:31 Client --> Server: </style><EOL>
2015-09-22 19:17:31 Client --> Server: <![endif]--><EOL>
2015-09-22 19:17:31 Client --> Server: </head><EOL>
2015-09-22 19:17:31 Client --> Server: <EOL>
2015-09-22 19:17:31 Client --> Server: <body><EOL>
2015-09-22 19:17:31 Client --> Server: <h3 align=3D"center">Привмер DOC файла</h3><EOL>
2015-09-22 19:17:31 Client --> Server: <EOL>
2015-09-22 19:17:31 Client --> Server: <p>Pełnomocnictwo do opinii starosty </p><EOL>
2015-09-22 19:17:31 Client --> Server: <EOL>
2015-09-22 19:17:31 Client --> Server: </body><EOL>
2015-09-22 19:17:31 Client --> Server: <EOL>
2015-09-22 19:17:31 Client --> Server: </html><EOL>
2015-09-22 19:17:31 Client --> Server: .<EOL>
2015-09-22 19:17:32 Client <-- Server: 250 2.0.0 OK 1442938670 ft3sm3903225wib.17 - gsmtp<EOL>
2015-09-22 19:17:32 Client --> Server: QUIT<EOL>
2015-09-22 19:17:32 Client <-- Server: 221 2.0.0 closing connection ft3sm3903225wib.17 - gsmtp<EOL>
2015-09-22 19:17:32 Debug: Disconnected.
2015-09-22 19:17:32 Debug: Disconnected.
2015-09-22 19:17:32 Debug: Disconnected