문제

는지 알고 싶 사용하는 방법을 정확하게 SwiftMailerHandlerMonolog packagist?
Monolog 문서를 보이지 않는데 사용한 예에 대한 SwiftMailerHandler 또 어쩌면 나를 놓친다.
SwiftMailerHandler 생성자 코드:

/**
 * @param \Swift_Mailer           $mailer  The mailer to use
 * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced
 * @param integer                 $level   The minimum logging level at which this handler will be triggered
 * @param Boolean                 $bubble  Whether the messages that are handled can bubble up the stack or not
 */
public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true)
{
    parent::__construct($level, $bubble);
    $this->mailer  = $mailer;
    if (!$message instanceof \Swift_Message && is_callable($message)) {
        $message = call_user_func($message);
    }
    if (!$message instanceof \Swift_Message) {
        throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it');
    }
    $this->message = $message;
}  

하지만 나는 아직도 알지 못하는 방법 설정 \Swift_Mailer $mailer 위에서 언급된다.
은 거기에 다른 어떤 단계/구성해야 할까요?

죄송하는 경우 나의 질문은 아주 기본적인 것입니다.
감사합니다.

도움이 되었습니까?

해결책

당신이 볼 필요가 Swift_Mailer 문서를 설정하는 방법 mailer.

https://swiftmailer.symfony.com/docs/sending.html

일단 당신이 당신의 메일러는 설정 그것은 당신이 무엇을 통과해야로 새로운 SwiftMailerHandler()위해$메일러 변수입니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top