2017-04-27 5 views
1
  1. 을 보내 어차피이 코드가 있습니다Laravel 5.1 - - Swift_TransportException .env의 파일에서 이메일을

    MAIL_DRIVER = SMTP

    MAIL_HOST=smtp.sendgrid.net 
    
    MAIL_PORT=587 
    
    [email protected] 
    
    MAIL_PASSWORD=hggahsd666 
    
    MAIL_ENCRYPTION=tls 
    

을 나는이 화면을 얻을 :

enter image description here

또한 시도 :

MAIL_DRIVER=smtp 
    MAIL_HOST=smtp.sendgrid.net 
    MAIL_PORT=465 
    [email protected] 
    MAIL_PASSWORD=hggahsd666 
    MAIL_ENCRYPTION=ssl 

을하지만 그나마 다시 작동 ...

을 나는 또한 .env의 파일에서와 동일하게 설정에/mail.php을 설정을 변경하려고하지만 일을 해달라고 말 I 시도 명령

php artisan cache:clear 

보안 도메인 https://asdasd.com/sendEmail에 대한 리디렉션 가능한 문제가 있습니까?

+0

또한 MAIL_ENCRYPTION = null로 시도했지만 다시 작동하지 않습니다. –

+0

아니요, 오프 소스 : –

+0

[예상 응답 코드 250이지만 코드 ""가있을 수 있습니다. ""] (http://stackoverflow.com/questions/31133301)/expected-response-code-250-but-got-code-with-message) – Nil

답변

1

이 방법처럼 mail.php 유지

<?php 
return [ 
    'driver' => env('MAIL_DRIVER', 'smtp'), 
    'host' => env('MAIL_HOST', 'smtp.gmail.com'), 
    'port' => env('MAIL_PORT', 587), 
    'from' => [ 
     'address' => '[email protected]', 
     'name' => 'Example', 
    ], 
    'encryption' => env('MAIL_ENCRYPTION', 'tls'), 
    'username' => env('MAIL_USERNAME'), 
    'password' => env('MAIL_PASSWORD'), 
    'sendmail' => '/usr/sbin/sendmail -bs', 

]; 

여전히 보안 수준이 낮은 앱

수 있도록 다음 작업 이메일 계정으로 이동하여 응용 프로그램의 설정을 변경하지 않으면 .env의 파일에있는 모든 자격 증명을 확인 그런 다음 크로스
+0

또한이 링크를 참조하십시오 http://stackoverflow.com/questio ns/31133301/expected-response-code-250-but-got-code-with-message ... 여러분의 질문이 반복되는 것 같습니다. 이러한 솔루션을 선택하면 이에 대한 해결책을 얻을 수 있습니다. – Nil