Symfony2 SymblogチュートリアルSwiftメール開発者バーでメールアイコンを取得しない
-
30-10-2019 - |
質問
私はこのチュートリアルをフォローしています:
http://tutorial.symblog.co.uk/docs/validators-and-forms.html
Swift Mailerパートでは、開発者バーに封筒のアイコンを取得していません。開発ボックスのチュートリアルに従って、実際のメールを送信しないので、封筒を取得する必要がありますか?
ここで私のapp/config/parameters.ini:
mailer_transport = "gmail"
mailer_encryption = "ssl"
mailer_auth_mode = "login"
mailer_host = "smtp.gmail.com"
mailer_user = "myemail@host.net"
mailer_password = "mypassword"
それから、SRC/Blogger/Blogbundle/Controller/PageController.phpを持っています:
public function contactAction()
{
#return $this->render('BloggerBlogBundle:Page:contact.html.twig');
$enquiry = new Enquiry();
$form = $this->createForm(new EnquiryType(), $enquiry);
$request = $this->getRequest();
if ($request->getMethod() == 'POST')
{
$form->bindRequest($request);
if ($form->isValid())
{
// Perform some action, such as sending an email
$message = \Swift_Message::newInstance()
->setSubject('Contact enquiry from symblog')
->setFrom('enquiries@symblog.co.uk')
->setTo($this->container->getParameter('blogger_blog.emails.contact_email'))
->setBody($this->renderView('BloggerBlogBundle:Page:contactEmail.txt.twig', array('enquiry' => $enquiry)));
$this->get('mailer')->send($message);
$this->get('session')->setFlash('blogger-notice', 'Your contact enquiry was successfully sent. Thank you!');
// Redirect - This is important to prevent users re-posting
// the form if they refresh the page
return $this->redirect($this->generateUrl('BloggerBlogBundle_contact'));
}
}
return $this->render('BloggerBlogBundle:Page:contact.html.twig', array(
'form' => $form->createView()
));
この後、私は彼らが持っているようなものすべてを持っています、私は何が欠けていますか?助けてください?ありがとう
正しい解決策はありません
所属していません StackOverflow