2017-05-10 9 views
0

텔넷을 통해 내 이메일 서버에 로그인하려고 할 때 504 오류가 발생합니다. 나는 포트 25와 587을 시도했다. (도메인과 ips를 * s와 xs로 마스킹).텔넷 오류 504를 통해 smtp 서버에 연결할 수 없습니다.

>EHLO domain.com 
250-************.outlook.office365.com Hello [xx.xx.xx.xx] 
250-SIZE 157286400 
250-PIPELINING 
250-DSN 
250-ENHANCEDSTATUSCODES 
250-STARTTLS 
250-8BITMIME 
250-BINARYMIME 
250 CHUNKING 
> HELP 
214-This server supports the following commands: 
214 HELO EHLO STARTTLS RCPT DATA RSET MAIL QUIT HELP AUTH BDAT 
> AUTH 
504 5.7.4 Unrecognized authentication type 
[*************.********.****.outlook.com] 
> auth 
504 5.7.4 Unrecognized authentication type 
[*************.********.****.outlook.com] 
> AUTH LOGIN 
504 5.7.4 Unrecognized authentication type 
[*************.********.****.outlook.com] 
> auth login 
504 5.7.4 Unrecognized authentication type 
[*************.********.****.outlook.com] 

나는! : 잘하지만 phpmailer를 사용

 <?php 
     $mail = new PHPMailer(true); 
     $mail->IsSMTP(); 
     $mail->Host = $host; 
     $mail->Port = 587; 
     $mail->SMTPDebug = 2; 
     $mail->SMTPSecure = "tls"; 
     $mail->SMTPAuth = true; 
     $mail->Username = $user; 
     $mail->Password = $password; 
     $mail->SetFrom($user, "chiliNUT"); 
     $mail->Subject = $subject; 
     $mail->MsgHTML($content); 
     $mail->send(); 

을 그것을 할 수 있습니다 그리고 인증을위한 후드가하고있다 :

public function Authenticate($username, $password) { 
    // Start authentication 
    fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF); 
    //... 

을 나는이 작업 얻을 수있는 방법 커맨드 라인?

답변

1

대부분의 합리적인 메일 서버가 암호화되지 않은 AUTH를 허용하지 않기 때문입니다. 서버에서 수신하는 기능 목록에는 AUTH가 포함되지 않으므로 PHPMailer가 자동으로 STARTTLS를 호출해야합니다. 텔넷을 사용하여 수동으로 쉽게이 작업을 수행 할 수 없습니다. openssl의 s_client 명령을 사용하여 더 잘 수행하십시오. PHPMailer 문제 해결 가이드에 다음과 같은 예가 있습니다.

openssl s_client -starttls smtp -connect smtp.outlook.office365.com:587 
+0

나는 누락 된 조각이라고 생각했습니다. 감사합니다! – chiliNUT