mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
An email to a member's personal board address, board+<token>@<domain>, becomes a card on that board, as Trello's email-to-board does (#794, #3948). The subject is the title; the body (quoted replies stripped, HTML as text) is the description, with a From line; attachments are attached (no SVG, as for uploads). The author is the address's member, never the From address, and they must still have write access when the email arrives. A reply whose In-Reply-To/References matches a card's thread becomes a comment on it. Notification Settings, at three levels: the Admin Panel turns it on and holds the domain, the provider webhook secret and the IMAP mailboxes with their passwords (never published, never sent back to a browser); a board admin turns the board on and picks the list and swimlane; board and member choose which parts of an email are used. The member sees and replaces their own address. It arrives by POST /api/inbound-email (Mailgun, SendGrid, Postmark, JSON, forms, multipart with attachments, raw MIME), by IMAP polling with imapflow and mailparser under a database lease so one replica polls, or on Sandstorm through the grain's own address: the bridge's Maildir is read, a member's board token in the subject routes it, and WeKan's outgoing email goes through HackSessionContext.send, since a grain has no network. The email and hack-session capnp schemas are generated with the other Sandstorm bindings. Unknown addresses, wrong webhook secrets and over-limit addresses are logged under authn.inbound-email. Rate limit per address, size limits, Message-ID deduplication. The new strings are translated in every locale. Thanks to xet7 !