Sending a tiddler or tiddlers via email?

Folks,

Emailing tiddler(s)
This would permit users of an online readonly wiki to send the author new or modified tiddlers for review and inclusion in the master wiki. Let us call this “Poorman’s change submission”.

Has anyone being able to make use of the mailto protocol to convert a tiddler or filter of tiddlers into a JSON file and attach it to an email?

I have tried a few times and stumbled, so hope it has being done before or someone knows the key to encoding and attaching files to an email.

Ideally we would have a button on a tiddler that offers to email that tiddler, or if provided with a filter or prepared JSON tiddler title, would attach that to an email.

On receipt of the tiddler package" the wiki owner could start an import and review the tiddlers, checking differences where the tiddler already exists and selectively import them.

Your thoughts?

That’s a nice idea.
I didn’t do much research, just 20 minutes of playing around with some possibilities. … Didn’t have the right idea yet :wink:

I think the main problem is, that you would first need to convert the JSON export structure of a tiddler into a file. Then send the file as an attachment to an e-mail app.

If you only send the JSON structure as the “body-text”, the receiver will need to convert the text into an importable format first. …

So the UX wouldn’t be that great.


I did export a tiddler as JSON and used the default browser save dialogue. Instead of saving to a file, I did send it to the e-mail app.

It seems the browser automatically adds an .html extension to the file. So it will be eg: tiddlers.json.html. The content is OK but would need to be renamed. :confused:

If the .html extension could be avoided, I think it would be a pretty simple workflow. … Some more research would be needed. — but I haven’t time for that atm.

1 Like

May be you can do this in three steps:

1- export tiddlers as json file
2-click a button to fire the mail client using an email template
3-attach the json

I think for security reasons you cannot use the mail protocol from html with attachment!

1 Like

https://ibnishak.github.io/Tesseract/pluginsandmacros/socialmacros/index.html

This one by Riz has some share by email option, but its not what you are looking for i guess

2 Likes

You can set the content of the body of the mail in the mailto link :

That way when you click the link, it will open your mail manager and fill the body with the content you wish, that you can then send.

You could also do that with a form : How to Create an HTML Form That Sends You an Email

But it seems like you cant send attached files with the mailto protocol for security reasons, so you would need a server for that.

The pr maker made by saqimtiaz rely on github, IMO it seems like a perfect solution for you.

1 Like

Thanks all for the comments and use cases. It has help guide me and restore ancient memories.

I recall I was the key technician installing an email solution for my employer in the early days of corporate email system’s.

As in the examples shared we already have the email mechanism that can send tiddler text, or ith a tweek html rendered text, but not yet permitting including tiddlers as file attachments.

Attachments are included in the email body as a mime type, base64 encoded.

With MIME, a message and all its attachments are encapsulated in a single multipart message, with base64 encoding used to convert binary into 7-bit ASCII text - or on some modern mail servers, optionally full 8-bit support via the 8BITMIME extension.

It seems to me we have the tools already to execute this it is just the last stretch.

  • Create a template that formats a set of tiddlers according to a filter into the appropriate mime type and encoded content.
  • Transclude the above into the email body.

I suspect the attachment can be a JSON mime type but this means the attachments will have the “.json” extension and I know this is not accepted by some systems, for example we could not upload json fields to Discourse until it was permitted.

The advantages of JSON files is you can drop them on tiddlywiki and import. A Quick check suggests giving it the “type json” or “.json” may be rejected in some email systems, but another extension such as .twd for “tiddlywiki data” if dropped on tiddlywiki will be recognised as JSON tiddlers.

Almost there, Regards
Tones

I will just bump this item up and add;

The JSZip Plugin is another way, we just need to find a way to encode the resulting zip and include it in the body.

Bump

Has anyone got any closer to finding a way to extend the mailto protocol to include a base 64 mime type in the body?

Not much help here, except to say that it would take tiddlywiki to the next level.

Doesn’t seem possible with Mailto which, from what I read, defaults to sending plain text mail and not MIME type mail. That seems reasonable from security point of view.

Ref: RFC 6068: The ‘mailto’ URI Scheme

The “body” field value is intended to contain the content for the first text/plain body part of the message. The “body” pseudo header field is primarily intended for the generation of short text messages for automatic processing (such as “subscribe” messages for mailing lists), not for general MIME bodies. Except for the encoding of characters based on UTF-8 and percent-encoding, no additional encoding (such as e.g., base64 or quoted-printable; see [RFC2045]) is used for the “body” field value. As a consequence, header fields related to message encoding (e.g., Content-Transfer-Encoding) in a ‘mailto’ URI are irrelevant and MUST be ignored. The “body” pseudo header field name has been registered with IANA for this special purpose (see Section 8.2).

You can of course still encode and sent stuff in the mail body, the mail system just wouldn’t recognize and handle it automatically like in MIME type mail. For example, somebody seems to have certain success with embedding html in mail body using mailto:

Perhaps an API to a mail; service that simply accepts the attachments is the way to go.

Whilst we may be able to emulate what a server does with email, with attachments, from TiddlyWIki, it looks like there are barriers in different clients and mail servers that would not honor the content.

  • Understandable since this has being an attack route over the years.

Yes, I agree, via crafted emails, users could interact with a tiddlywiki publisher even without write access. For example they could fill out a survey and send the result via email submission, the owner could then import to the wiki, or a different wiki, the email and its attachments will be part of the process.

Perhaps we can craft a way to package tiddlers into the body text, in a way that TiddlyWikis can parse them out into tiddlers when dropped on a wiki?

  • If we can make this both human and machine readable then it should go in an email body.

    • I am thinking CSV or key-value pairs?
    • or perhaps tiddler/key/value pairs
    • Then parse these into tiddlers.
  • As a result the submitter gives their email address, and you could accept only one submission per email address.

1 Like