Show .TXT attachments inline as message content?

This is a feature request that might be only applicable to me. I have a friend who insists on using SMS to communicate. I use his carrier’s email-to-SMS gateway so I don’t have to be tied to a cell phone to communicate. His Verizon SMS to email gateway sends messages as TXT file attachments. I’d love for Delta Chat to show the plain text attachment as plain text instead of as an attachment. Gnome Evolution and Mozilla Thunderbird have similar features that show attachments inline for easy reading. Again, not super important at all.

these .TXT attachments may be very long, you can have whole book there. this would not only break the chat flow, but would also raise several implementation issues, so, i think, the current approach is the better one - also, as you can use eg. your favorite ebook reader to read the text.

for comparison with other mua: they usually do not show the messages in a chat view but have a dedicated “scroll window” for the message so this is less of an issue there.

1 Like

you could maybe write a bot for your usecase that acts as middleman unpacking the message text from the attachment into an message.

1 Like

Oooh! That’s an idea. I’ll try to research that more. Thanks!

we created an introduction page to creating bots, it might be already a bit outdated though and its more about the classical bot use-case (having commands that trigger messages with the result of the action they invoked): https://bots.delta.chat/

There are several bindings for various programming languages to the core: GitHub - deltachat/deltachat-core-rust: Delta Chat Rust Core library, used by Android/iOS/desktop apps and bindings

I would suggest using python as it’s quick to learn and python has the best bindings currently.

Some links for references:

If you need help feel free to ask in the Bots category of this forum.

2 Likes

I’ve been thinking about something similar, delta already has an html viewer. This can be used to view some attachments such as *.txt, *.html, *.eml

you touch the attachment and it opens directly in Delta

if you want you can download it and open it with another application

1 Like

Or you can transform the attachment from txt, eml, into html and use the “Show full message…” :thinking:

1 Like

The use case of Delta.Chat is to facilitate a chat-like experience.

Considering that opening up the response-attachment in another application will seriously break the chat flow, especially for time-sensitive exchanges, ignoring this use case seems to go against Delta.Chat’s own communications goals. These text attachments are actually meant as instant communication - they’re part of SMS or MMS. Granted, it’s a weird decision on the part of Verizon, with awkward results, but nonetheless this seems to fit within Delta.Chat’s remit.

The large text attachment concern is a valid one, but it could be mitigated by a “show more” prompt, or an attachment size flag wherein textfile sizes above X amount would trigger a warning. Most of these attachments are only bytes long. The overhead in most legit instances should be extremely low.

I was going to post this myself as a Feature Proposal, but the system showed this topic already created. Happy to create a new request if this still gets no traction.

I think the benefit is extremely clear. Imagine if Delta.Chat could functionally act as a fluid SMS client, with just the implementation of this one feature. That would be huge.

I mean, the whole idea is streamlining and reassessing legacy technologies, right? It doesn’t get more old-school than using the existing SMS/MMS email gateways providers have had up and running almost since the existence of email.

Of course, there’s also the security concern that should go along with using a separate app to open files meant as messages. Corollary to this, whatever method Delta.Chat uses to view any textfile attachments would need to be examined carefully to prevent creating new vulnerabilities.

1 Like

it is quite a niche usage, if you receive a .txt file as attachment it is for a reason in most cases, otherwise your peer could just send you a normal text message, things gets complicated when you also have a normal text part and a txt attachment at the same time, or several txt attachments, etc.

while just opening the txt is not that of a big deal and will open with your phone’s html viewer the same way “show full message” shows you html emails

still maybe we could improve this but the efforts to do so probably are better spent in a more important area with more impact for users, maybe you could help with solving this issue?

Maybe have an option where it’ll display the text of the .txt file instead of the subject and body if it’s from the SMS/MMS gateways? I doubt anyone is going to be using SMS/MMS to type up a message that would break the flow of Delta.Chat

It’s only niche because no one is doing it now, and no one is doing it because basically nobody knows about it. Very few people have a need to SMS someone from an email account. Honestly, I’m surprised providers have kept these gateways up and running for so long.

But they have. And a whole lot of people would have a need to SMS/MMS someone from an instant messenger - if they knew it was possible.

Delta.Chat is turning email into chat. Which means that an SMTP-to-SMS gateway will allow chat to bridge to SMS. People will use it (if the feature is publicized well enough that they know it exists). This will also help with bootstrapping/adoption.

Thinking further on it, I think it would be totally fine, and probably easier, to hardcode a size limit on .txt file attachments that can be displayed inline. Again, these messages are tiny. Kilobytes of the single digits would be more than sufficient to complete the function.

I did not know that. That’s not a great method either, because the HTML viewer is also a separate app viewing potentially sensitive content. Well, hmm.

It’s from the OS and very likely also from the same people/company that made your OS, so it has already full power over your phone and the OS could technically just do screenshots or access all data. But no reason to get Paranoid… I personally think you can trust google and apple there (though probably depends on your unique threat-model).

Anyways you could also make a fork of delta chat that does shows the txt content inline. :person_shrugging:

But on the other hand I agree that sth like that is not hard to add for us, though we need to be careful not to introduce too many niche functionality that people might start to rely on and we later can not keep supporting with our small team. (they will be mad if we need to remove it again ;p )
So I’m neutral on this issue for now.