<p>Currently not.  If Craft sees that there isn't anything specified for the <a href="https://craftcms.com/classreference/models/EmailModel#htmlBody-detail" rel="nofollow">htmlBody</a> property of <a href="https://craftcms.com/classreference/models/EmailModel" rel="nofollow">EmailModel</a> will run the <a href="https://craftcms.com/classreference/models/EmailModel#body-detail" rel="nofollow">body</a> property though Markdown and set that to htmlBody.</p>

CC BY-SA 3.0
2015-12-17T19:08:54.260Z
Ok, good to know. I've managed to get a minimal version of the HTML working as expected, so it probably won't be too bad. Thanks for the confirmation, though!
Gavin Anderegg
CC BY-SA 3.0
2017-03-13T01:48:28.580Z
I see this is still the case. It's actually a real pain not being able to send plain text emails. I'm having to roll back to php mail() to get the job done for my purpose.
JamesNZ
CC BY-SA 3.0
2017-03-13T03:51:58.100Z
@JamesNZ You should consider thumbs-upping/leave a comment here: https://github.com/craftcms/cms/issues/1107
Brad Bell
CC BY-SA 3.0
2015-12-17T18:39:50.730Z
2015-12-17T18:39:50.730Z
Brad Bell
<p>I currently have a plugin that's successfully sending email using <code>EmailModel()</code>. The problem is: it's sending a multi-part email with HTML and plain text components. For this particular email, it would be best if I could just send the plain text portion.</p>

<p>Is there a way to disable the HTML segment when sending via <code>EmailModel()</code>?</p>

<plugin-development><emails>
Send plain text email using EmailModel?
# Send plain text email using EmailModel?

(Asked by: username_0 on 2015-12-17)

I currently have a plugin that's successfully sending email using `EmailModel()`. The problem is: it's sending a multi-part email with HTML and plain text components. For this particular email, it would be best if I could just send the plain text portion.

Is there a way to disable the HTML segment when sending via `EmailModel()`?

**Tags:** plugin-development, emails

---

## 1 answers

### Answer by username_1 on 2015-12-17. Score: 2 | Accepted answer

Currently not. If Craft sees that there isn't anything specified for the [htmlBody](https://craftcms.com/classreference/models/EmailModel#htmlBody-detail) property of [EmailModel](https://craftcms.com/classreference/models/EmailModel) will run the [body](https://craftcms.com/classreference/models/EmailModel#body-detail) property though Markdown and set that to htmlBody.

> **Comments:**
> **username_0**: Ok, good to know. I've managed to get a minimal version of the HTML working as expected, so it probably won't be too bad. Thanks for the confirmation, though!  
> **username_2**: I see this is still the case. It's actually a real pain not being able to send plain text emails. I'm having to roll back to php mail() to get the job done for my purpose.  
> **username_1**: @JamesNZ You should consider thumbs-upping/leave a comment here: https://github.com/craftcms/cms/issues/1107  

---

