adonisjs / mail

AdonisJS Email Provider
MIT License
102 stars 32 forks source link

Edge: "LabeledStatement" is not supported #71

Closed AstaDK closed 2 years ago

AstaDK commented 2 years ago

I'm using edge to create template for sending email. But I faced a error with Edge My code example:

return Mail.send((message) => {
        message
          .embed(Application.tmpPath('/images/bg.png'), 'bg')
          .from('me@gmail.com')
          .to(email)
<div style="background-image: url({{cid:bg}}); padding: 0px 64px 20px 64px ;width: 700px; height: 1200px; margin: 0 auto;  background-repeat: no-repeat; object-fit: contain">

then I faced an error:

status: 'rejected', reason: EdgeError: "LabeledStatement" is not supported

Have any suggestions for me. Thanks a lot

AstaDK commented 2 years ago

@thetutlage Please help me!

RomainLanz commented 2 years ago

You have an error in your template.

Closing since you are pinging people to have faster help. Think about it.

thetutlage commented 2 years ago

This should have been a discussion thread at first place. Also, as @RomainLanz stated, please try and avoid pinging people for no reasons.

You are simply referencing cid incorrectly. Here's a screenshot from the docs

CleanShot 2021-10-17 at 13 09 24@2x