Mercurial > prosody-modules
comparison mod_email/mod_email.lua @ 3836:070faeaf51bc
mod_email: Allow sender to override content-type
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 05 Jan 2020 10:48:23 +0000 |
| parents | 74d7e59b3511 |
| children |
comparison
equal
deleted
inserted
replaced
| 3835:5258f0afa8b4 | 3836:070faeaf51bc |
|---|---|
| 12 Subject = headers; | 12 Subject = headers; |
| 13 From = config.origin; | 13 From = config.origin; |
| 14 }; | 14 }; |
| 15 end | 15 end |
| 16 headers.To = to; | 16 headers.To = to; |
| 17 headers["Content-Type"] = 'text/plain; charset="utf-8"'; | 17 if not headers["Content-Type"] then |
| 18 headers["Content-Type"] = 'text/plain; charset="utf-8"'; | |
| 19 end | |
| 18 local message = smtp.message{ | 20 local message = smtp.message{ |
| 19 headers = headers; | 21 headers = headers; |
| 20 body = content; | 22 body = content; |
| 21 }; | 23 }; |
| 22 | 24 |
