title: Error when embed image in mail using Yii2
body: <p>I want to embed images in my mail body and I follow the documentation on <a href="http://www.yiiframework.com/doc-2.0/guide-tutorial-mailing.html" rel="nofollow">http://www.yiiframework.com/doc-2.0/guide-tutorial-mailing.html</a> .</p>
  
  <p>My code in the controller looks like this:</p>
  
  <pre><code>$messages[] = Yii::$app-&gt;mailer-&gt;compose('downNotify', [
      'websiteList' =&gt; $websiteList,
      'logo' =&gt; Url::to('@web/mail/images/logo.png')
  ])
  </code></pre>
  
  <p>And in the mail view file:</p>
  
  <pre><code>&lt;a href="#"&gt;&lt;img width="100" src="&lt;?= $message-&gt;embed($logo); ?&gt;"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>However when I run it, it gives me the error: </p>
  
  <blockquote>
    <p>fopen(/WEBSITE_MONITOR/web/mail/images/logo.png): failed to open stream: No such file or directory</p>
  </blockquote>
  
  <p>The path is valid but I don't know why I get this error. Is anyone has similar problem?</p>