Fork me on GitHub
Subscribe 4

Ticket #794 (fixed bug)

Mails seem to be HTML by default

  • Created: 2013-01-06 23:38:29
  • Reported by: Franz
  • Assigned to: Franz
  • Milestone: 2.0-alpha2
  • Component: email
  • Priority: normal

We should switch to text-only emails.


Franz 2013-02-08 16:52:08

Great, this is now possible. See this Laravel issue.

Oldskool 2013-03-23 20:19:21

Why not just use multipart e-mails and let the e-mail client decode the part it prefers?

Franz 2013-03-24 12:18:07

Do you mean sending both HTML and plain-text mails?
I'd enjoy that... can you create some nice templates?

Oldskool 2013-03-25 16:23:26

Yes, that's exactly what multipart e-mails are. They contain both the text and HTML version in a single message, delimited by a so called "boundary", which you set in the headers of the mail. The mail client then only decodes the part that it's able to (or the version which the end-user set in his preferences). I'll see if I can create some examples soon.

AoSiX 2013-06-05 09:52:12

Here is the solution with Laravel :

To send an html only mail :

Mail::send('', $data, function($message)

To send text only (the text key is important) :

Mail::send(array('text' => ''), $data, function($message)

To send a html & text mail, with bourdary :

Mail::send(array('', ''), $data, function($message)

Franz 2014-06-23 12:58:23

  • Owner set to Franz.

There's even a Mail::plain() shortcut now. This is fixed.

Franz 2014-06-23 12:58:36

  • Status changed from open to fixed.