<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.theeggeadventure.com/wikimedia/index.php?action=history&amp;feed=atom&amp;title=Metasend</id>
	<title>Metasend - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.theeggeadventure.com/wikimedia/index.php?action=history&amp;feed=atom&amp;title=Metasend"/>
	<link rel="alternate" type="text/html" href="https://www.theeggeadventure.com/wikimedia/index.php?title=Metasend&amp;action=history"/>
	<updated>2026-04-17T07:41:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://www.theeggeadventure.com/wikimedia/index.php?title=Metasend&amp;diff=2033&amp;oldid=prev</id>
		<title>Egge at 08:45, 29 September 2008</title>
		<link rel="alternate" type="text/html" href="https://www.theeggeadventure.com/wikimedia/index.php?title=Metasend&amp;diff=2033&amp;oldid=prev"/>
		<updated>2008-09-29T08:45:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:45, 29 September 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l66&quot;&gt;Line 66:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 66:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Python]] [[Category:Solaris]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key egge_wikimedia-mw_:diff:1.41:old-1439:rev-2033:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Egge</name></author>
	</entry>
	<entry>
		<id>https://www.theeggeadventure.com/wikimedia/index.php?title=Metasend&amp;diff=1439&amp;oldid=prev</id>
		<title>Brianegge at 16:22, 8 June 2006</title>
		<link rel="alternate" type="text/html" href="https://www.theeggeadventure.com/wikimedia/index.php?title=Metasend&amp;diff=1439&amp;oldid=prev"/>
		<updated>2006-06-08T16:22:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:22, 8 June 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l57&quot;&gt;Line 57:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 57:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     msgRoot.attach(msgText)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     msgRoot.attach(msgText)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     mailhost.sendmail(options._from, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;options.to&lt;/del&gt;, msgRoot.as_string())&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    sendto = (&#039; &#039;.join([elem for elem in [options.to, options.cc] if elem != None])).split(&#039; &#039;)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     mailhost.sendmail(options._from, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sendto&lt;/ins&gt;, msgRoot.as_string())&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     mailhost.quit()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     mailhost.quit()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key egge_wikimedia-mw_:diff:1.41:old-1416:rev-1439:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Brianegge</name></author>
	</entry>
	<entry>
		<id>https://www.theeggeadventure.com/wikimedia/index.php?title=Metasend&amp;diff=1416&amp;oldid=prev</id>
		<title>Brianegge at 20:43, 25 May 2006</title>
		<link rel="alternate" type="text/html" href="https://www.theeggeadventure.com/wikimedia/index.php?title=Metasend&amp;diff=1416&amp;oldid=prev"/>
		<updated>2006-05-25T20:43:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[http://www.gsp.com/cgi-bin/man.cgi?section=1&amp;amp;topic=metasend metasend] is crude interface for sending non-text mail.  Today I ran into a problem where a program expected it to be installed, and failed.  Since what metasend is doing is not too terrible difficult, I figured I could create a Python program to do the same.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# $Header: $&lt;br /&gt;
# Simulates the unix utility &amp;#039;metasend&amp;#039;&lt;br /&gt;
# Specifically, this was created for Solaris 10 x86, which doesn&amp;#039;t have metasend installed.  Some old tcl scripts call metasend, so this should keep them running&lt;br /&gt;
# http://www.gsp.com/cgi-bin/man.cgi?section=1&amp;amp;amp;topic=metasend&lt;br /&gt;
&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
import pwd&lt;br /&gt;
import string&lt;br /&gt;
import smtplib&lt;br /&gt;
import re&lt;br /&gt;
import traceback&lt;br /&gt;
from email.MIMEMultipart import MIMEMultipart&lt;br /&gt;
from email.MIMEText import MIMEText&lt;br /&gt;
from email.MIMEImage import MIMEImage&lt;br /&gt;
from optparse import OptionParser&lt;br /&gt;
&lt;br /&gt;
def main(argv):&lt;br /&gt;
    parser = OptionParser()&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-b&amp;amp;quot;, &amp;amp;quot;--batch&amp;amp;quot;, action=&amp;amp;quot;store_true&amp;amp;quot;, help=&amp;amp;quot;specifies Batch (non-interactive) Mode. Will exit with an error message if all additional needed information is not provided on the command line.&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-c&amp;amp;quot;, &amp;amp;quot;--cc&amp;amp;quot;, help=&amp;amp;quot;specifies the CC address&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-D&amp;amp;quot;, &amp;amp;quot;--description&amp;amp;quot;, help=&amp;amp;quot;specifies a string to be used as the Content-description value&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-e&amp;amp;quot;, &amp;amp;quot;--encoding&amp;amp;quot;, help=&amp;amp;quot;specifies the encoding type. Must be either \&amp;amp;quot;base64\&amp;amp;quot;, \&amp;amp;quot;quoted-printable\&amp;amp;quot;, \&amp;amp;quot;7bit\&amp;amp;quot;, or \&amp;amp;quot;x-uue\&amp;amp;quot;. \&amp;amp;quot;7bit\&amp;amp;quot; means no encoding is performed.&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-E&amp;amp;quot;, action=&amp;amp;quot;store_true&amp;amp;quot;, help=&amp;amp;quot;specifies that the file being included is already a full MIME entity, and does not need to have any Content-* or other header fields added.&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-f&amp;amp;quot;, &amp;amp;quot;--filename&amp;amp;quot;, help=&amp;amp;quot;specifies the file containing the data&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-F&amp;amp;quot;, &amp;amp;quot;--from&amp;amp;quot;, dest=&amp;amp;quot;_from&amp;amp;quot;, help=&amp;amp;quot;specifies the From address&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-i&amp;amp;quot;, &amp;amp;quot;--content-id-mime&amp;amp;quot;, help=&amp;amp;quot;specifies the content-id value for the MIME entity. Must be a legal content-id value, enclosed in angle brackets.&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-I&amp;amp;quot;, &amp;amp;quot;--content-id&amp;amp;quot;, help=&amp;amp;quot;specifies the content-id for the multipart entity being created by metasend, if any. Must be a legal content-id value, enclosed in angle brackets.&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-m&amp;amp;quot;, &amp;amp;quot;--mime-type&amp;amp;quot;, help=&amp;amp;quot;specifies the MIME content-type&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-n&amp;amp;quot;, action=&amp;amp;quot;append&amp;amp;quot;, help=&amp;amp;quot;specifies that an additional file is to be included.&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-o&amp;amp;quot;, &amp;amp;quot;--outputfile&amp;amp;quot;, help=&amp;amp;quot;specifies that the output from metasend should go to a named file rather than be delivered as mail.&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-P&amp;amp;quot;, &amp;amp;quot;--preamblefile&amp;amp;quot;, help=&amp;amp;quot;specifies a file containing alternative text to be put in the \&amp;amp;quot;preamble\&amp;amp;quot; area of a MIME multipart message.&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-s&amp;amp;quot;, &amp;amp;quot;--subject&amp;amp;quot;, help=&amp;amp;quot;specifies the Subject field&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-S&amp;amp;quot;, &amp;amp;quot;--splitsize&amp;amp;quot;, help=&amp;amp;quot;specifies the maximum size before splitting into parts&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-t&amp;amp;quot;, &amp;amp;quot;--to&amp;amp;quot;, help=&amp;amp;quot;specifies the To address&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-z&amp;amp;quot;, help=&amp;amp;quot;specifies that the temporary files should be deleted EVEN IF DELIVERY FAILS.&amp;amp;quot;)&lt;br /&gt;
    parser.add_option(&amp;amp;quot;-/&amp;amp;quot;, &amp;amp;quot;--subtype&amp;amp;quot;, help=&amp;amp;quot;specifies the use of a MIME multipart subtype other than \&amp;amp;quot;mixed\&amp;amp;quot;.&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    parser.set_defaults(_from=pwd.getpwuid(os.getuid())[0])&lt;br /&gt;
    (options, args) = parser.parse_args()&lt;br /&gt;
&lt;br /&gt;
    mailhost = smtplib.SMTP()&lt;br /&gt;
    mailhost.connect(&amp;#039;relay.london.kbcfp.com:25&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    msgRoot = MIMEMultipart(&amp;#039;related&amp;#039;)&lt;br /&gt;
    msgRoot[&amp;#039;Subject&amp;#039;] = options.subject&lt;br /&gt;
    msgRoot[&amp;#039;From&amp;#039;] = options._from&lt;br /&gt;
    msgRoot[&amp;#039;To&amp;#039;] = options.to&lt;br /&gt;
    msgRoot[&amp;#039;Cc&amp;#039;] = options.cc&lt;br /&gt;
    msgRoot.preamble = &amp;#039;This is a multi-part message in MIME format.&amp;#039;&lt;br /&gt;
    &lt;br /&gt;
    html = open(options.filename).read()&lt;br /&gt;
    msgText = MIMEText(html, &amp;#039;html&amp;#039;)&lt;br /&gt;
    msgRoot.attach(msgText)&lt;br /&gt;
&lt;br /&gt;
    mailhost.sendmail(options._from, options.to, msgRoot.as_string())&lt;br /&gt;
    mailhost.quit()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;#039;__main__&amp;#039;:&lt;br /&gt;
    main(sys.argv)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brianegge</name></author>
	</entry>
</feed>