4
입니다. PHP의 mail() 함수는 메일을 제대로 보내지 만 Swiftmailer의 Swift_MailTransport는 작동하지 않습니다!Swiftmailer는 메일을 보내지 않지만 mail()은
mail('[email protected]', 'test '.date('H:i:s'), '');
을하지만이되지 않습니다 :
이 작동
$transport = Swift_MailTransport::newInstance('');
$mailer = Swift_Mailer::newInstance($transport);
$message = Swift_Message::newInstance('test '.date('H:i:s'))
->setFrom('[email protected]')
->setTo('[email protected]')
->setBody('Testing one two three');
$result = $mailer->send($message);
(. [email protected]
내 테스트 코드에서 유효한 이메일 주소로 대체)
메일 로그 두 경우 모두 매우 유사하게 보이며 메일이 후자에서 전송되고있는 것처럼 보입니다.
스팸 메일 필터에 의해 차단되는 원인이되는 Swiftmailer에 의해 생성 된 메시지에 뭔가가있을 수 있습니까?
은 (그런데, 나는 행운과 함께, SMTP 전송을 사용하여 시도했다, 나는 메일()가 제대로 작동하기 때문에, Swiftmail의 메일 전송로 전환 할 사소한 것이라고 생각 ...)
여기에도 같은 문제가 있습니다. 나는 [logger Plugin] (http://swiftmailer.org/docs/plugins.html)을 활성화 시켰지만 아무 것도 출력하지 않았다. – PiTheNumber
나는이 질문을 다시 물었다. http://stackoverflow.com/q/10617552/956397 – PiTheNumber
[SwiftMailer가 메일을 보내지 않는 이유는 무엇입니까?] (https://stackoverflow.com/questions/10617552/swiftmailer-does) -not-send-mail-why) – fracz