title: How can I add a picture in an email which is a html format with SwiftMailer (Symfony2)
body: <p>I have developed a page for a client, and I have to do a newsletter. I already have the template of the mail and what I want is to insert a picture in those emails.</p>
  
  <p>The code :</p>
  
  <pre><code>foreach($customer as $customer)
  {
    $mail = $customer-&gt;getMailcustomer();
    $message = \Swift_Message::newInstance();
    $message-&gt;setSubject('Info');
    $message-&gt;setFrom('abcd@noreply.ch');
    $message-&gt;setTo($mail);
    $message-&gt;setContentType("text/html");
  
    $message-&gt;setBody(
      $this-&gt;renderView(
              'MyBundle:Customer:email.html.twig',
              array('form' =&gt; $form-&gt;createView())
      )
    );
  
    $this-&gt;get('mailer')-&gt;send($message);  
  }
  </code></pre>
  
  <p>This code works and I have a nice email page but what I don't know is how to insert a picture in it.</p>
  
  <p>I tried to insert a picture in the <code>email.html.twig</code> but it didn't work.</p>