This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

pp.conturi55335
pp.conturi55335

Hello, guys. I have a fight with some emails.

Mail::send('acme.blog::mail.message', $vars, function($message) use ($body){
    $message->setBody($body);
});

If i use this code, the css of the template is not parse to the email. Which is really bad. :(

Know someone with a solution for this issue? :D

mjauvin
mjauvin

where's your css? what is the code for $body?

pp.conturi55335
pp.conturi55335

$body it's a variable with html.

Hello, Jhon
Here it's your activation link:
<a href="#" class="btn btn-primary">ACTIVE</a>

Something like that for example. If i send the email without setBody, the email have css when it's send, but if i use setBody the email will be send without css. So, in this case my classes for the button is not loaded...

mjauvin
mjauvin

You'd probably be better off with this event:

https://octobercms.com/docs/api/mailer/addcontent

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.