body_text for inbound emails are empty

gmoore1
Tera Expert

I have emails that are coming into the system whose body_text is empty, but I can see the text of the email in the Body textarea when I drill down into the email. In the Inbound Email Action, I'm parsing for name/value pairs in the email to generate a request. How do I access the body of the email when the body_text is empty?

I tried to retrieve the text from email.body, but it doesn't appear to work.

2 REPLIES 2

john_roberts
Mega Guru

Any chance you are using the Sendmail plugin for inbound email? I just experienced it last week in a sendmail instance. Haven't dug into the details yet.


I'm not sure, I'll have to ask Ramiro.

Anyway, this is what I have discovered while testing an Inbound Email Action. To simplify testing, I was re-processing emails from the Email system log instead of sending new emails into the system. By chance, I chose an email that just happen to be an email sent in plain text, no HTML. Everytime the inbound email action script tried to access the email.body_text, it got back an empty string. Drilling down into the email via the email list view, I could see that Body textarea was populated, but the Body_Text textarea was empty. But emails with HTML content, had both textarea populated. This became less of an issue, when I discovered that the property email.body_text was populated correctly for incoming emails. My assumpton is that plain text emails are not be persisted correctly, and thats why my re-processing of existing emails had problems.