diff options
-rw-r--r-- | lib/configuration.c | 2 | ||||
-rw-r--r-- | webdo.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/configuration.c b/lib/configuration.c index 7f51896..19808b4 100644 --- a/lib/configuration.c +++ b/lib/configuration.c @@ -218,7 +218,7 @@ int cFrame::sendMail(const char* mimeType, const char* receivers, mailBody = strReplace("\"", "'", body); // mailBody = strReplace("!", "", mailBody); - tell(0, "Send mail '%s' with [%s] to '%s'", subject, body, receivers); + tell(0, "Send mail '%s' with [%s] to '%s' (%s)", subject, body, receivers, mimeType); asprintf(&command, "%s \"%s\" \"%s\" \"%s\" %s", mailScript, subject, mailBody.c_str(), mimeType, receivers); @@ -1831,6 +1831,9 @@ int cEpgHttpd::doSendMail(json_t* jInData, json_t* response) const char* subject = getStringFromJson(jInData, "subject", "test"); const char* mimeType = getStringFromJson(jInData, "mimetype", "text/plain"); + if (isEmpty(mimeType)) + mimeType = "text/plain"; + getParameter("epgd", "mailScript", mailScript); if (isEmpty(mailScript)) @@ -1841,7 +1844,7 @@ int cEpgHttpd::doSendMail(json_t* jInData, json_t* response) // send HTML mail - tell(0, "Send mail '%s' with [%s] to '%s'", subject, body, receiver); + tell(0, "Send mail '%s' with [%s] to '%s' (%s)", subject, body, receiver, mimeType); asprintf(&command, "%s '%s' '%s' '%s' %s", mailScript, subject, body, mimeType, receiver); |