sh8email-django
sh8email-django copied to clipboard
Strip HTML code from email contents in API call to given user
For given <username>, the GET response to https://sh8.email/rest/mail/<username>/list/ is as follows:
[
{
"pk": <some pk>,
"recipient": <username>,
"sender": <sender's email address>,
"subject": <email subject>,
"contents": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Trans",
"recipDate": <received DateTime>,
"isSecret": false,
"isRead": false
}
{
(another email...)
}
]
Here, the "contents" of each email is only limited to 50 characters for convenience, but allows HTML codes in them; it should return the first 50 characters from the plaintext of the email.
Note: https://github.com/triplepy/sh8email-django/blob/master/rest/views.py#L23
I will check this. Thanks @hunj
Heck, now CSS:

What the... T.T