I know that it is not possible to attach the tiddler to a mail
I am using [ext[Send a mail|mailto:name@example.com?subject=Report&body=Hello]] very successfully.
Is it possible to replace the body with the tiddler, the same content as used as export as *.tid?
Maybe something like [ext[Send a mail|mailto:name@example.com?subject=Report&body=<<currentTiddler>>]] ?
I will take what is possible.
Yes, my dream is to transfer the complete tiddler to the email body as:
Field One: The first field
created: 20240822101732531
creator: Author
modified: 20240822103515921
modifier: Author
tags: [[Alpha Tag]]
title: New Tiddler 1
Tiddler content.
I did change company-com to example.com, because that one can be used for all type of URL examples. Itβs reserved exactly for that purpose. It does no harm to use it.
This is possible, you need a template to present the tiddler in this form as the body and in the mail to:
Perhaps setting the body last so it can contain New lines.
It will open the default email app from which you can send.
It is theoretically possible to attach files such as tiddlers, json and binary files but they need to be added to the body after encoding and with mime type headers. Some email apps may not accept such attachments.
I have wasted many hours trying to do this but not yet succeeded
I am not sure if this will solve your requirements but I will start some tests by
Save the tiddler (No changes to the standard download folder settings)
Open a mail in the standard mail app with the tiddler saved in (1)
Did you tested more than the standard [ext[Send attachment|mailto:name@example.com?subject=Attachment&body=Hello&?attach='Path_and_Filename' ]] ? What is not working in my environment.
I want to avoid double work and testing β¦
[ext[links]] are converted to <a href="... so we will create HTML code here, since it is easier than to create wikitext that needs to be rendered.
We can use some functions to define the different elements and then concatenate everything together.
\define mailto() mailto:name@example.com β¦ defines the base address. name needs to be defined as needed
\function f.user() [{$:/status/UserName}] β¦ returns the name from the ControlPanel setting
\function f.currentTiddler() [<tv-history-list>get[current-tiddler]] β¦ reads the HistoryList current-tiddler
\function f.subject() "?subject=Tiddler: " [<f.currentTiddler>] " - " [<f.user>] +[join[]] β¦ builds the mailto: subject prefix, gets current-tiddler, adds " - ", adds user-name and concatenates it to a string
\function f.body() "&body=" [<body-text>encodeuri[]] +[join[]] β¦ defines the body-prefix, reads the body-text variable and uri-encodes it, so it can be used in a link
\function f.createMailto() [<mailto>] [<f.subject>] [<f.body>] +[join[]] β¦ joins all functions from above together