1
여기에 몇 개의 게시물과 swiftmailer에 2 개의 다른 전자 메일을 포함하는 방법에 대한 설명서가 있지만 오류가 발생하고 그 이유를 모르겠습니다. 여기 Symfony 2.3 Swiftmailer - 2 전자 메일
내 구성입니다 : 나는 또한 서비스 파일 생성//config.yml
swiftmailer:
default_mailer: mailer
mailers:
mailer:
transport: smtp
host: some.host1
username: some.username1
password: some.password2
mailer2:
transport: gmail
host: some.host2
username: some.username2
password: some.password2
:
# app/config/services.yml
services:
mailer:
class: AppBundle\Mailer
arguments: [sendmail]
mailer2:
class: AppBundle\Mailer
arguments: [sendmail]
그리고 컨트롤러에 내가 말하는 겁니다를 모두 같은 :
$mailer = $this->get('mailer2');
//or
$mailer = $this->get('mailer');
만 기본 메일러가 작동합니다. 두 번째 우편 발송자의 경우 :
You have requested a non-existent service "mailer2".
어떻게 해결할 수 있습니까?
나는 docum을 읽었다. 그러나 '신속한 메일 발송자'를 완전히 놓쳤다. 처음에는 부분적으로주의를 기울여 주셔서 감사합니다. 지금 작동하고있는 것처럼 보입니다. 감사합니다. – user3253748