laravel 5.4 embed image in mail

前端 未结 6 1009
无人及你
无人及你 2020-12-17 10:21

I have just upgraded my 5.2 install of laravel to 5.3 and then to 5.4 following the official upgrading methods.

I am now tryin

6条回答
  •  既然无缘
    2020-12-17 10:36

    It seems that the older $message->embed doesn't work nicely with Markdown emails. Like you mentioned in the comments it seems broken since 5.4

    But you could just try it like this inside your markdown email:

    This is your logo 
    ![Some option text][logo]
    
    [logo]: {{asset('/img/official_logo.png')}} "Logo"
    

    Like shown here: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#images

    Asset function reference: https://laravel.com/docs/5.4/helpers#method-asset

提交回复
热议问题