Usage
Before calling openmail, you write the contents of your message to a temporary file, using a simplified RFC 2822 format.
Usage example:
1. Create a file TMP.EML with the following content:
To: user@isp.com Subject: KontoauszugSehr geehrter Kunde!
Wir erlauben uns, Sie auf folgende, noch ausstehende Rechnungen aufmerksam zu machen :
...
Mit freundlichen Grüßen
If the file contains non-ASCII characters, it should be cp850 encoded.
2. At the command line, type:
lino openmail TMP.EML
How openmail does it
openmail reads the specified file, then constructs a «mailto:» link and launches the default web browser with this URL. 46 contains some testcases.
So the result is the same as clicking on a "mailto" link. The browser is responsible for invoking the mail client correctly. And the user for configuring her browser so that "mailto:" links work.
Test: Does your browser invoke your e-mail client correctly?
- first
The subject is quite complex, and it is likely that openmail does not work out of the box. Don't hesitate to contact me.
Sources of information
- www.faqs.org/rfcs/rfc2368.html The mailto URL scheme
- selfhtml.teamone.de/html/verweise/email.htm comprehensive description of mailto URLs
- www.ianr.unl.edu/internet/mailto.html states that multiline-bodies must be specified using multiple "body=" attributes. (But "This feature will NOT work with all e-mail programs, in which case the body information appears as a single line.")
Alternative approaches (instead of using the mailto link) could be:
- launch the mail client directly, but this would involve writing "drivers" for every supported mail client.
- starting an `*.eml`file on Windows will invoke Outlook with the expected behaviour... except that the message is not editable for further reviewing before sending it.
- Mozilla seems to not be able to handle `*.eml`files: bugzilla.mozilla.org/show_bug.cgi?id=11076
Setting the default browser
The windows registry key
HKEY_CLASSES_ROOT\mailto\shell\open\command
should contain
rundll32.exe url.dll,MailToProtocolHandler %1
Notes
- C:\Programme\mozilla.org\Mozilla\mozilla.exe -browser "mailto:%1"
- C:\PROGRA~1\Qualcomm\Eudora\Eudora.exe /m %1 `ForceDDEForHandlingMailto=1`in `[Settings]` section of `eudora.ini`.
- support.microsoft.com/default.aspx?scid=kb;EN-US;154359 How to Change Default Mail Client for Internet Explorer
- home.att.net/~cherokee67/eudoradefault.html
- support.microsoft.com/default.aspx?scid=kb;EN-US;149617: Eudora Changes Default MailTo Handler
- members.toast.net/4pf/Protocol.html: "Internet Explorer (version 6, anyway) uses Windows Messaging by default to invoke a mailer on a mailto: link. Only if the MAPI install is misconfigured will it resort to directly accessing the mailto association key."
Refering articles:
- some timtools broken in 0.6.20 (Fixed bugs 21.09.06) — I noticed that sync, openmail, openurl and sysinfo don't work in release 0.6.20. more
- unknown encoding: iso-8859-1 (Releases 06.04.05) — One user reports a traceback when invoking the frozen openmail.py. more
- 0.5.4 (Releases 12.12.02) — New TIM Tool openmail. TIM users can now have their default mail client started by TIM, with a new ready to send message (to:, subject: and body) generated by TIM.