# Using bots through non-Delta Chat email clients?

**URL:** <https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027>\
**Category:** Bots\
**Created:** [April 20, 2024, 1:26pm UTC](https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027 "2024-04-20T13:26:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![WofWca](https://forum.delta.chat/user_avatar/forum.delta.chat/wofwca/32/1702_2.png) [@WofWca](https://forum.delta.chat/u/WofWca)\
**Post date:** [April 20, 2024, 1:26pm UTC](https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027/1 "2024-04-20T13:26:38Z")

</div>

I was thinking of using the Delta Chat library (deltachat-rpc-client I believe it is) to write an email bot primarily for the non-Delta Chat email audience, because [the examples](https://bots.delta.chat/quickstart.html) look pretty simple and I don’t know any other “email chatbot” libraries.  
(I know the [gettor@torproject.org](mailto:gettor@torproject.org) email ([DOWNLOADING | Tor Project | Tor Browser Manual](https://tb-manual.torproject.org/downloading/)), and I have found no indication of any chatbot libs being used in [its source](https://gitlab.torproject.org/tpo/anti-censorship/rdsys/-/blob/b00e65b6fc424d76feebb961dff8ab60dc4b56c2/pkg/presentation/distributors/gettor/email.go)).

But [bots.delta.chat](http://bots.delta.chat) seems to mostly talk about Delta Chat specifically and not email (SMPT, IMAP, etc) in general.

I tried to send a message to one bot using another email client. I got a response, but the interaction is not ideal because apparently the bot read the message as `(No Subject) – /help`, whereas it should have been `/help` — the email’s subject got appended to the message.

So

1. How well does the current Delta Chat bot infrastructure support non-Delta Chat clients, if at all?
2. If not at all  
2.1 Is it even feasible?  
2.2 Are there plans to support it?  
2.3 What are the recommended alternatives? For Python? For Go?

---

<div class="post-metadata">

**Author:** ![link2xt](https://forum.delta.chat/letter_avatar_proxy/v4/letter/l/ee7513/32.png) [@link2xt](https://forum.delta.chat/u/link2xt)\
**Post date:** [April 20, 2024, 1:28pm UTC](https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027/2 "2024-04-20T13:28:57Z")

</div>

> [@WofWca](#):
>
> apparently the bot read the message as `(No Subject) – /help`

I think this should be filed as a bug into the core repo (EDIT: I filed an issue [Do not put subject into message text if `bot` config is set · Issue #5499 · deltachat/deltachat-core-rust · GitHub](https://github.com/deltachat/deltachat-core-rust/issues/5499)). Simple solution would be to stop appending the subject to the message in case bot config is set.

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [April 20, 2024, 2:19pm UTC](https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027/3 "2024-04-20T14:19:00Z")

</div>

> 1. How well does the current Delta Chat bot infrastructure support non-Delta Chat clients, if at all?

we have eg. [`dc_msg_set_subject()`](https://c.delta.chat/classdc __msg__ t.html#a50513126385580c514d947e077f7645b) - it is not exposed in UI and iirc was added to make bots look better when using Non-Delta-Chat-Clients, as one of the bigger issues. so, afaik, bots work with Non-Dc-Clients in general, @adbenitez will know more

for the other way round, how a bot sees the subject there is [`dc_msg_get_subject()`](https://c.delta.chat/classdc __msg__ t.html#a919df8620e6d9a094dd64842e9360b9d), it is used for the title in HTML-views, but iirc also for bots

getting rid of prepending subject to the text, however, would be a more complicated and need adaption of APIs and UIs, so, we should not go for that now, if at all. but maybe we can stop doing prepending subject when `is_bot` is set - or, as a solution for today, a bot could just hack around that and skip to the first space-endash-space ` – ` or substract subject from text 😉

in general, i think, bots should be quite tolerant wrt text input anyways - if i would write a bot, i would not take care about whether text is entered to subject or body (and i assume, this is what most bots are doing) - so a get\_text() just returning both is maybe not that bad.

but the `(No Subject)` looks as a bug, indeed, that would be visible in UI as well, right?

---

<div class="post-metadata">

**Author:** ![adbenitez](https://forum.delta.chat/user_avatar/forum.delta.chat/adbenitez/32/2323_2.png) [@adbenitez](https://forum.delta.chat/u/adbenitez)\
**Post date:** [April 20, 2024, 3:35pm UTC](https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027/4 "2024-04-20T15:35:25Z")

</div>

> [@r10s](#):
>
> in general, i think, bots should be quite tolerant wrt text input anyways - if i would write a bot, i would not take care about whether text is entered to subject or body (and i assume, this is what most bots are doing) - so a get\_text() just returning both is maybe not that bad.

yes, a bot could be tolerant and support commands in subject and in body, the problem is the way core returns the body, for a non-delta user even the signature will cause issues, for stripping the subject from the msg text the bot could use the new available subject property and strip it from the msg text body, because a — could be part of the actual message

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [April 20, 2024, 4:08pm UTC](https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027/5 "2024-04-20T16:08:36Z")

</div>

> [@adbenitez](#):
>
> for a non-delta user even the signature will cause issues

why? core should strip signature accordingly - and if core fails there, and it is fixable for the bot, it should be fixed in core (so signature is not visible in UI as well)

---

<div class="post-metadata">

**Author:** ![adbenitez](https://forum.delta.chat/user_avatar/forum.delta.chat/adbenitez/32/2323_2.png) [@adbenitez](https://forum.delta.chat/u/adbenitez)\
**Post date:** [April 20, 2024, 5:04pm UTC](https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027/6 "2024-04-20T17:04:24Z")

</div>

it is stripped but […] is inserted IIRC

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [April 20, 2024, 6:03pm UTC](https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027/7 "2024-04-20T18:03:27Z")

</div>

yip, […] is inserted for stripped signatures, non-simple-quotes, too long texts

---

<div class="post-metadata">

**Author:** ![link2xt](https://forum.delta.chat/letter_avatar_proxy/v4/letter/l/ee7513/32.png) [@link2xt](https://forum.delta.chat/u/link2xt)\
**Post date:** [April 20, 2024, 6:09pm UTC](https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027/8 "2024-04-20T18:09:46Z")

</div>

> [@r10s](#):
>
> yip, […] is inserted for stripped signatures, non-simple-quotes, too long texts

Long texts are not truncated if receiver is a bot:

> <https://github.com/deltachat/deltachat-core-rust/blob/242547f1e971b51d31e083f2f5875a04130eebeb/src/mimeparser.rs#L1146-L1159>

---

<div class="post-metadata">

**Author:** ![Simon](https://forum.delta.chat/user_avatar/forum.delta.chat/simon/32/287_2.png) [@Simon](https://forum.delta.chat/u/Simon)\
**Post date:** [April 22, 2024, 4:07pm UTC](https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027/9 "2024-04-22T16:07:54Z")

</div>

> [@WofWca](#):
>
> [bots.delta.chat](http://bots.delta.chat)

that site needs reworking, so take it with a grain of salt. (I started a new version, but It is not complete enough yet to be uploaded.)

resources I’d recommend right now:

- [GitHub - deltachat-bot/echo: An echo bot in multiple languages to get you started](https://github.com/deltachat-bot/echo)
- [https://py.delta.chat](https://py.delta.chat)

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [October 6, 2026, 3:14pm UTC](https://forum.delta.chat/t/using-bots-through-non-delta-chat-email-clients/3027/10 "2026-10-06T15:14:43Z")

</div>


