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

r.schmutz28947
r.schmutz28947

In the docs is written:

By default, the view given to the send method is assumed to contain HTML. However, by passing an array as the first argument to the send method, you may specify a plain text view to send in addition to the HTML view:

Mail::send(['acme.blog::mail.html', 'acme.blog::mail.text'], $data, $callback);

but the mail.text view file is ignored. For the plain text part of the message also the mail.html view file is used. Did I miss something? Or is this a bug?

mjauvin
mjauvin

I don't know but you can have both views (plain text and html) in the same view file. see here:

https://octobercms.com/docs/services/mail#mail-views

mjauvin
mjauvin
mjauvin

Looks like you can also pass an array with key/value pairs (html, text, raw)

r.schmutz28947
r.schmutz28947

Thank you mjauvin, plain text and html in the same file worked properly.

However passing an array as first argument to the send method didn't work as expected. I've tried it with and without array keys. (Btw. passing an numerical array with only one element throws an exception.)

I think, this is a bug...

mjauvin
mjauvin

ok, can you please open an issue for this on github?

1-6 of 6

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