<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HM2K.com &#187; Email</title>
	<atom:link href="http://www.hm2k.com/posts/category/internet/email/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hm2k.com</link>
	<description>The research of an internet entrepreneur and IT consultant</description>
	<lastBuildDate>Wed, 30 Jun 2010 09:29:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Print dialog does not appear in Outlook Express or Internet Explorer</title>
		<link>http://www.hm2k.com/posts/print-dialog-does-not-appear</link>
		<comments>http://www.hm2k.com/posts/print-dialog-does-not-appear#comments</comments>
		<pubDate>Thu, 04 Sep 2008 11:43:18 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Printers]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=216</guid>
		<description><![CDATA[Today I get a call.
Outlook Express won&#8217;t print.
I log in and take a look. Everything seems normal, and normal documents appear to print.
However, when I click the print button or go to File &#62; Print nothing happens. Strange.
They are running Windows XP Professional SP2, with IE6.

All you have to do is go to Start &#62; [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/how-to-minimize-microsoft-office-outlook-to-the-system-tray' rel='bookmark' title='Permanent Link: How to Minimize Microsoft Office Outlook to the System Tray'>How to Minimize Microsoft Office Outlook to the System Tray</a> <small>Open your registry and find or create the key below....</small></li>
<li><a href='http://www.hm2k.com/posts/how-to-print-to-a-text-file' rel='bookmark' title='Permanent Link: How to Print to a Text File'>How to Print to a Text File</a> <small>Device Manager does not have a Save command available for...</small></li>
<li><a href='http://www.hm2k.com/posts/exporting-emails-with-the-dates-from-microsoft-outlook' rel='bookmark' title='Permanent Link: Exporting emails with the dates from Microsoft Outlook'>Exporting emails with the dates from Microsoft Outlook</a> <small>The Problem: By default when you try and export emails...</small></li>
<li><a href='http://www.hm2k.com/posts/how-to-restart-the-explorer-shell-in-windows-xp' rel='bookmark' title='Permanent Link: How to restart the explorer shell in Windows XP'>How to restart the explorer shell in Windows XP</a> <small>If you have landed yourself here chances are you already...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Today I get a call.</p>
<blockquote><p>Outlook Express won&#8217;t print.</p></blockquote>
<p>I log in and take a look. Everything seems normal, and normal documents appear to print.</p>
<p>However, when I click the print button or go to File &gt; Print nothing happens. Strange.</p>
<p>They are running Windows XP Professional SP2, with IE6.</p>
<p><span id="more-216"></span></p>
<p>All you have to do is go to Start &gt; Run and issue the following commands:</p>
<blockquote><p>regsvr32 vbscript.dll<br />
regsvr32 jscript.dll</p></blockquote>
<p>Once this is done, restart Outlook Express/Internet Explorer, and go ahead and print.</p>
<p>This isn&#8217;t the first time i&#8217;ve seen this issue, so I thought I&#8217;d note it down for next time.</p>
<p><a href="http://groups.google.com/group/microsoft.public.windows.inetexplorer.ie6.browser/msg/828b37ff4124ce77?hl=en&amp;dmode=source">Source</a></p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/how-to-minimize-microsoft-office-outlook-to-the-system-tray' rel='bookmark' title='Permanent Link: How to Minimize Microsoft Office Outlook to the System Tray'>How to Minimize Microsoft Office Outlook to the System Tray</a> <small>Open your registry and find or create the key below....</small></li>
<li><a href='http://www.hm2k.com/posts/how-to-print-to-a-text-file' rel='bookmark' title='Permanent Link: How to Print to a Text File'>How to Print to a Text File</a> <small>Device Manager does not have a Save command available for...</small></li>
<li><a href='http://www.hm2k.com/posts/exporting-emails-with-the-dates-from-microsoft-outlook' rel='bookmark' title='Permanent Link: Exporting emails with the dates from Microsoft Outlook'>Exporting emails with the dates from Microsoft Outlook</a> <small>The Problem: By default when you try and export emails...</small></li>
<li><a href='http://www.hm2k.com/posts/how-to-restart-the-explorer-shell-in-windows-xp' rel='bookmark' title='Permanent Link: How to restart the explorer shell in Windows XP'>How to restart the explorer shell in Windows XP</a> <small>If you have landed yourself here chances are you already...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/print-dialog-does-not-appear/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What is a valid email address?</title>
		<link>http://www.hm2k.com/posts/what-is-a-valid-email-address</link>
		<comments>http://www.hm2k.com/posts/what-is-a-valid-email-address#comments</comments>
		<pubDate>Tue, 03 Jun 2008 16:31:12 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[email address]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[verification]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=205</guid>
		<description><![CDATA[With the on-going abuse to email based systems, we are in need of ways to validate the email addresses we&#8217;re handling.
We all know what an email address looks like, we see them and use them every single day. But how do you know if it&#8217;s valid or not? The next obvious question should be, what [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/email-address-on-your-website' rel='bookmark' title='Permanent Link: email address on your website'>email address on your website</a> <small>This is something that people don&#8217;t seem to realise, and...</small></li>
<li><a href='http://www.hm2k.com/posts/tracking-an-ip-address' rel='bookmark' title='Permanent Link: Tracking an IP address'>Tracking an IP address</a> <small>In my job I have to manage lots of machines...</small></li>
<li><a href='http://www.hm2k.com/posts/fax-to-email' rel='bookmark' title='Permanent Link: Fax to email'>Fax to email</a> <small>Fax to email is perhaps one of the most interesting,...</small></li>
<li><a href='http://www.hm2k.com/posts/start-your-own-free-email-service' rel='bookmark' title='Permanent Link: Start your own free email service'>Start your own free email service</a> <small>I have been interested in starting my own free email...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>With the on-going abuse to email based systems, we are in need of ways to validate the email addresses we&#8217;re handling.</p>
<p>We all know what an email address looks like, we see them and use them every single day. But how do you know if it&#8217;s valid or not? The next obvious question should be, what defines a valid email address?</p>
<p>This is what I intend on investigating.</p>
<p><span id="more-205"></span></p>
<p>Before you begin, I would like you make you aware of the difference between validation and verification, which is as follows:</p>
<blockquote><p>Validation is a check to ensure it is true to the specification (eg: is the number N digits long?). Not to be confused with verification which is a check to ensure it is correct within the intended system (eg: does the number work when phoned?).</p></blockquote>
<p>A good starting point for anyone to investigating what anything is, is Wikipedia. So, as to make this easy to follow, that&#8217;s where we&#8217;re going to start, by looking at the &#8220;<a href="http://en.wikipedia.org/wiki/E-mail_address">E-mail address</a>&#8221; article.</p>
<p>As you read the article, you&#8217;ll soon find out about the limitations and validation (not to be confused with <a href="http://en.wikipedia.org/wiki/E-mail_authentication">authentication</a>) set by the <a href="http://en.wikipedia.org/wiki/Request_for_Comments">RFCs</a>.  The earliest RFC with regards to email was [<a href="http://tools.ietf.org/html/rfc822">RFC822</a>], which was made obsolete by [<a href="http://tools.ietf.org/html/rfc2822">RFC2822</a>]. There are other RFCs you should perhaps also pay attention to which are listed in the article, however I intend on going over these later.</p>
<p>To fully understand how to find out what a valid email address is, we need to fully understand what an RFC is and why we need them.</p>
<p>An RFC (request for comments) essentially is a way in which internet developers can set standards and protocols. The RFCs we need to be focusing on are the ones relating to email, as they will tell us exactly what defines an email address as an email address. Thus in order for us to fully understand what defines an email as valid, we MUST read the RFCs.</p>
<p>RFCs however, aren&#8217;t easy, they are written what appears to be a mystical language, that looks like English, but it isn&#8217;t. Okay, so maybe it&#8217;s not that bad, but it isn&#8217;t exactly a straight forward task to translate it into &#8220;Plain English&#8221;.</p>
<p>After reading <a href="http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx">I Knew How To Validate An Email Address Until I Read The RFC</a> and <a href="http://www.pgregg.com/projects/php/code/showvalidemail.php">Paul Gregg&#8217;s Demonstrating why email regexs are poor</a>, I knew this wasn&#8217;t going to be easy.</p>
<p>To utilise the specification written in the RFC, we need to convert it into a usable language. In this case we will be using regular expressions within PHP. This article assumes you understand PHP and regular expressions, or will at least try&#8230;</p>
<p>And so I decided to start translating [<a href="http://tools.ietf.org/html/rfc2822">RFC2822</a>] into PHP based regular expressions.</p>
<p>The RFC often provides binary encoded US-ASCII characters and standard characters, in most cases I will translate them to hexadecimal encoding using <a href="http://www.php.net/chr">chr()</a>, <a href="http://www.php.net/ord">orc()</a> and <a href="http://www.php.net/dechex">dechex()</a> (eg: %d109 -&gt; chr(109) -&gt; m -&gt; orc(m) -&gt; 109 -&gt; dechex(109) -&gt; \\x6D).</p>
<p><em>Note: The PHP code here is for display purposes only, it may not actually work due to the changes wordpress makes to the formatting (in particular to the double quotes), if you require the proper code, it is available on request.</em></p>
<blockquote><p>FROM: General Description [<a href="http://tools.ietf.org/html/rfc2822#section-2.1">RFC2822 Section 2.1</a>]<br />
Messages are divided into lines of characters.  A line is a series of<br />
characters that is delimited with the two characters carriage-return<br />
and line-feed; that is, the carriage return (CR) character (ASCII<br />
value 13) followed immediately by the line feed (LF) character (ASCII<br />
value 10).  (The carriage-return/line-feed pair is usually written in<br />
this document as &#8220;CRLF&#8221;.)</p></blockquote>
<p>$CR            = &#8220;\\x0d&#8221;;<br />
$LF            = &#8220;\\x0a&#8221;;<br />
$CRLF        = &#8220;(?:$CR$LF)&#8221;;</p>
<blockquote><p>FROM: Primative Tokens [<a href="http://tools.ietf.org/html/rfc2822#section-3.2.1">RFC2822 Section 3.2.1</a>]</p>
<p>The following are primitive tokens referred to elsewhere in this<br />
standard, but not otherwise defined in [http://tools.ietf.org/html/rfc2234 RFC2234].  Some of them will<br />
not appear anywhere else in the syntax, but they are convenient to<br />
refer to in other parts of this document.</p>
<p>NO-WS-CTL       =       %d1-8 /         ; US-ASCII control characters<br />
%d11 /          ;  that do not include the<br />
%d12 /          ;  carriage return, line feed,<br />
%d14-31 /       ;  and white space characters<br />
%d127<br />
text            =       %d1-9 /         ; Characters excluding CR and LF<br />
%d11 /<br />
%d12 /<br />
%d14-127 /<br />
obs-text<br />
specials        =       &#8220;(&#8221; / &#8220;)&#8221; /     ; Special characters used in<br />
&#8220;&lt;&#8221; / &#8220;&gt;&#8221; /     ;  other parts of the syntax<br />
&#8220;[" / "]&#8221; /<br />
&#8220;:&#8221; / &#8220;;&#8221; /<br />
&#8220;@&#8221; / &#8220;\&#8221; /<br />
&#8220;,&#8221; / &#8220;.&#8221; /<br />
DQUOTE</p>
<p>No special semantics are attached to these tokens.  They are simply<br />
single characters.</p></blockquote>
<p>$NO_WS_CTL        = &#8220;[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]&#8220;;<br />
$text            = &#8220;[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f]&#8220;;<br />
$DQUOTE            = &#8220;\\x22&#8243;;<br />
$specials        = &#8220;[\\x28\\x29\\x3c\\x3e\\x5b\\x5d\\x3a\\x3b\\x40\\x5c\\x2c\\x2e$DQUOTE]&#8220;;</p>
<blockquote><p>FROM: Miscellaneous obsolete tokens [<a href="http://tools.ietf.org/html/rfc2822#section-4.1">RFC2822 Section 4.1</a>]<br />
obs-qp          =       &#8220;\&#8221; (%d0-127)<br />
obs-text        =       *LF *CR *(obs-char *LF *CR)<br />
obs-char        =       %d0-9 / %d11 /          ; %d0-127 except CR and<br />
%d12 / %d14-127         ;  LF</p></blockquote>
<p>$obs_qp            = &#8220;(?:\\x5c[\\x00-\\x7f])&#8221;;<br />
$obs_char        = &#8220;[\\x00-\\x09\\x0b\\x0c\\x0e-\\x7f]&#8220;;<br />
$obs_text        = &#8220;(?:$LF*$CR*(?:$obs_char$LF*$CR*)*)&#8221;;</p>
<blockquote><p>FROM: Structured Header Field Bodies [<a href="http://tools.ietf.org/html/rfc2822#section-2.2.2">RFC2822 Section 2.2.2</a>]<br />
the space (SP, ASCII value 32) and horizontal tab (HTAB, ASCII value 9) characters<br />
(together known as the white space characters, WSP)</p></blockquote>
<p>$WSP            = &#8220;[\\x20\\x09]&#8220;;</p>
<blockquote><p>FROM: Obsolete folding white space [<a href="http://tools.ietf.org/html/rfc2822#section-4.2">RFC2822 Section 4.2</a>]<br />
obs-FWS         =       1*WSP *(CRLF 1*WSP)</p></blockquote>
<p>$obs_FWS        = &#8220;(?:$WSP+(?:$CRLF$WSP+)*)&#8221;;</p>
<blockquote><p>FROM: Quoted characters [<a href="http://tools.ietf.org/html/rfc2822#section-3.2.2">RFC2822 Section 3.2.2</a>]<br />
quoted-pair     =       (&#8220;\&#8221; text) / obs-qp</p></blockquote>
<p>$quoted_pair    = &#8220;(?:\\x5c$text|$obs_qp)&#8221;;</p>
<blockquote><p>FROM: Folding white space and comments [<a href="http://tools.ietf.org/html/rfc2822#section-3.2.3">RFC2822 Section 3.2.3</a>]<br />
FWS             =       ([*WSP CRLF] 1*WSP) /   ; Folding white space<br />
obs-FWS<br />
ctext           =       NO-WS-CTL /     ; Non white space controls</p>
<p>%d33-39 /       ; The rest of the US-ASCII<br />
%d42-91 /       ;  characters not including &#8220;(&#8220;,<br />
%d93-126        ;  &#8220;)&#8221;, or &#8220;\&#8221;<br />
ccontent        =       ctext / quoted-pair / comment<br />
comment         =       &#8220;(&#8221; *([FWS] ccontent) [FWS] &#8220;)&#8221;<br />
CFWS            =       *([FWS] comment) (([FWS] comment) / FWS)</p></blockquote>
<p>$FWS            = &#8220;(?:(?:(?:$WSP*$CRLF)?$WSP*)|$obs_FWS)&#8221;;<br />
$ctext            = &#8220;(?:$NO_WS_CTL|[\\x21-\\x27\\x2A-\\x5b\\x5d-\\x7e])&#8221;;<br />
$ccontent        = &#8220;(?:$ctext|$quoted_pair)&#8221;;<br />
/* NOTICE: &#8216;ccontent&#8217; translated only partially to avoid an infinite loop. */<br />
$comment        = &#8220;(?:\\x28((?:$FWS?(?:$ccontent|(?1)))*$FWS?\\x29))&#8221;;<br />
$CFWS           = &#8220;((?:$FWS?$comment)*(?:(?:$FWS?$comment)|$FWS))&#8221;;</p>
<blockquote><p>FROM: Atom [<a href="http://tools.ietf.org/html/rfc2822#section-3.2.4">RFC2822 Section 3.2.4</a>]<br />
atext           =       ALPHA / DIGIT / ; Any character except controls,<br />
&#8220;!&#8221; / &#8220;#&#8221; /     ;  SP, and specials.<br />
&#8220;$&#8221; / &#8220;%&#8221; /     ;  Used for atoms<br />
&#8220;&amp;&#8221; / &#8220;&#8216;&#8221; /<br />
&#8220;*&#8221; / &#8220;+&#8221; /<br />
&#8220;-&#8221; / &#8220;/&#8221; /<br />
&#8220;=&#8221; / &#8220;?&#8221; /<br />
&#8220;^&#8221; / &#8220;_&#8221; /<br />
&#8220;`&#8221; / &#8220;{&#8221; /<br />
&#8220;|&#8221; / &#8220;}&#8221; /<br />
&#8220;~&#8221;<br />
atom            =       [CFWS] 1*atext [CFWS]<br />
dot-atom        =       [CFWS] dot-atom-text [CFWS]<br />
dot-atom-text   =       1*atext *(&#8220;.&#8221; 1*atext)</p></blockquote>
<p>$ALPHA            = &#8216;[\\x41-\\x5a\\x61-\\x7a]&#8216;;<br />
$DIGIT            = &#8216;[\\x30-\\x39]&#8216;;<br />
$atext            = &#8220;(?:$ALPHA|$DIGIT|[\\x21\\x23-\\x27\\x2a\\x2b\\x2d\\x2f\\x3d\\x3f\\x5e\\x5f\\x60\\x7b-\\x7e])&#8221;;<br />
$atom            = &#8220;(?:$CFWS?$atext+$CFWS?)&#8221;;<br />
$dot_atom_text    = &#8220;(?:$atext+(?:\\x2e$atext+)*)&#8221;;<br />
$dot_atom        = &#8220;(?:$CFWS?$dot_atom_text$CFWS?)&#8221;;</p>
<blockquote><p>FROM: Quoted strings [<a href="http://tools.ietf.org/html/rfc2822#section-3.2.5">RFC2822 Section 3.2.5</a>]<br />
qtext           =       NO-WS-CTL /     ; Non white space controls</p>
<p>%d33 /          ; The rest of the US-ASCII<br />
%d35-91 /       ;  characters not including &#8220;\&#8221;<br />
%d93-126        ;  or the quote character<br />
qcontent        =       qtext / quoted-pair<br />
quoted-string   =       [CFWS]<br />
DQUOTE *([FWS] qcontent) [FWS] DQUOTE<br />
[CFWS]</p></blockquote>
<p>$qtext            = &#8220;(?:$NO_WS_CTL|[\\x21\\x23-\\x5b\\x5d-\\x7e])&#8221;;<br />
$qcontent        = &#8220;(?:$qtext|$quoted_pair)&#8221;;<br />
$quoted_string    = &#8220;(?:$CFWS?\\x22(?:$FWS?$qcontent)*$FWS?\\x22$CFWS?)&#8221;;</p>
<blockquote><p>FROM: Miscellaneous tokens [<a href="http://tools.ietf.org/html/rfc2822#section-3.2.6">RFC2822 Section 3.2.6</a>]<br />
word            =       atom / quoted-string</p></blockquote>
<p>$word            = &#8220;(?:$atom|$quoted_string)&#8221;;</p>
<blockquote><p>Obsolete Addressing [http://tools.ietf.org/html/rfc2822#section-4.4 RFC2822 Section 4.4]<br />
obs-local-part  =       word *(&#8220;.&#8221; word)<br />
obs-domain      =       atom *(&#8220;.&#8221; atom)</p></blockquote>
<p>$obs_local_part    = &#8220;(?:$word(?:\\x2e$word)*)&#8221;;<br />
$obs_domain        = &#8220;(?:$atom(?:\\x2e$atom)*)&#8221;;</p>
<blockquote><p>FROM: Addr-spec specification [<a href="http://tools.ietf.org/html/rfc2822#section-3.4.1">RFC2822 Section 3.4.1</a>]</p>
<p>addr-spec       =       local-part &#8220;@&#8221; domain<br />
local-part      =       dot-atom / quoted-string / obs-local-part<br />
domain          =       dot-atom / domain-literal / obs-domain<br />
domain-literal  =       [CFWS] &#8220;[" *([FWS] dcontent) [FWS] &#8220;]&#8221; [CFWS]<br />
dcontent        =       dtext / quoted-pair<br />
dtext           =       NO-WS-CTL /     ; Non white space controls</p>
<p>%d33-90 /       ; The rest of the US-ASCII<br />
%d94-126        ;  characters not including &#8220;[",<br />
;  "]&#8220;, or &#8220;\&#8221;</p></blockquote>
<p>$dtext            = &#8220;(?:$NO_WS_CTL|[\\x21-\\x5a\\x5e-\\x7e])&#8221;;<br />
$dcontent        = &#8220;(?:$dtext|$quoted_pair)&#8221;;<br />
$domain_literal    = &#8220;(?:$CFWS?\\x5b(?:$FWS?$dcontent)*$FWS?\\x5d$CFWS?)&#8221;;<br />
$local_part        = &#8220;(?:$dot_atom|$quoted_string|$obs_local_part)&#8221;;<br />
$domain            = &#8220;(?:$dot_atom|$domain_literal|$obs_domain)&#8221;;<br />
$addr_spec        = &#8220;($local_part\\x40$domain)&#8221;;</p>
<p>There we have it, how to validate an email address according to [<a href="http://tools.ietf.org/html/rfc2822">RFC2822</a>].</p>
<p>However, let&#8217;s stop right there and reflect on what we have here. What we have is regular expression based on [<a href="http://tools.ietf.org/html/rfc2822">RFC2822</a>] that must be correct, but does it work? are there any problems? Well yes, there are some problems&#8230;</p>
<ul>
<li>The comments, and content of comments have an infinite loop due to possible nested comments.</li>
<li>It does not appear to validate folding white space where it should.</li>
<li>It does not correctly validate domain literals (IP addresses), they are simply not validated by [<a href="http://tools.ietf.org/html/rfc2822">RFC2822</a>], which means that IP addresses that (under current protocol) are invalid (eg: 300.300.300.300) .</li>
<li>Domain names are not validated correctly either, IP addresses are allowed, when they shouldn&#8217;t be, and certain characters are allowed in places they shouldn&#8217;t, like dash (-) at the start or end of a domain name (eg: test@-example.com).</li>
<li>Length is no concern, email addresses can be as long as you like, much like the regex.</li>
<li>There are many more RFC&#8217;s to investigate and translate before we can fully validate all parts of an email address.</li>
<li>The email address validation regular expression according to [<a href="http://tools.ietf.org/html/rfc2822">RFC2822</a>] ALONE is almost 20,000 characters long, that&#8217;s BEFORE we look into solving these other issues.</li>
</ul>
<p>This is simply <strong>unacceptable</strong>.</p>
<p>Although there are fixes and workarounds, in the form of stripping, and further validation based on other RFCs I began to feel that this wasn&#8217;t really suitable for validating real world email addresses.</p>
<p>Ultimately I feel that unless you&#8217;re building an mail client or an mail server sticking so strictly to the RFC (especially [<a href="http://tools.ietf.org/html/rfc2822">RFC2822</a>]) isn&#8217;t always going to give you the best results, in real world situations.</p>
<p>Look around, email addresses in the real world aren&#8217;t so strict and are far more loosely defined.</p>
<ul>
<li>No folding white space (FWS) &#8211; I&#8217;ve never seen a multi-line email address field for a single address.</li>
<li>No comments (CFWS) &#8211; Comments simply do not belong in an email address, they can go else where.</li>
<li>No quotes &#8211; When was the last time you saw quoted text in an email address?</li>
<li>No IP addresses, domains only &#8211; They are only used in temporary circumstances, not live.</li>
<li>No new lines &#8211; they could result in &#8220;email header injection&#8221;.</li>
<li>Reasonable lengths &#8211; both parts, and the whole thing needs to be kept to a reasonable maximum length.</li>
<li>The domain part doesn&#8217;t need to be so strict &#8211; We can easily verify it later using DNS.</li>
<li>TLDs need to be future proof &#8211; Don&#8217;t restrict yourself to a set list. Don&#8217;t forget about <a href="http://idn.icann.org/">IDN</a>.</li>
<li>Most RFCs are outdated, and unreliable &#8211; Remember they are technical documents for servers and clients, but not for real world situations.</li>
<li>Only need to validate real world email addresses &#8211; Don&#8217;t be concerned with edge case test samples.</li>
</ul>
<p>Hence forth, the rest of this article will concentrate on this &#8220;less strict&#8221; or &#8220;LOOSE&#8221; specification, defined by real world situations, rather than technical.</p>
<p>Upon going back to the drawing board I discovered [<a href="http://www.apps.ietf.org/rfc/rfc3696.html">RFC3696</a>], written by the guy who wrote [<a href="http://www.apps.ietf.org/rfc/rfc2881.html">RFC2881</a>] (SMTP). This will give us the basics of what is required for a valid email address.</p>
<p>[<a href="http://www.apps.ietf.org/rfc/rfc3696.html#sec-3">RFC3696 Section 3</a>] entitled &#8220;Restrictions on email addresses&#8221; states:</p>
<blockquote><p>Contemporary email addresses consist of a &#8220;local part&#8221; separated from    a &#8220;domain part&#8221; (a fully-qualified domain name) by an at-sign (&#8220;@&#8221;).</p></blockquote>
<p>We&#8217;ll look at the &#8220;local part&#8221; first.</p>
<p>First off, as above, we will be overlooking quoted forms.</p>
<blockquote><p>[<a href="http://www.apps.ietf.org/rfc/rfc3696.html#sec-3">RFC3696 Section 3</a>]</p>
<p>&#8220;These quoted    forms are rarely recommended, and are uncommon in practice&#8221;</p></blockquote>
<p>We&#8217;ll ignore anything about using quotes, &#8220;real world&#8221; email addresses don&#8217;t contain quotes.</p>
<blockquote><p>[<a href="http://www.apps.ietf.org/rfc/rfc3696.html#sec-3">RFC3696 Section 3</a>]</p>
<p>Without quotes, local-parts may consist of any combination of    alphabetic characters, digits, or any of the special characters</p>
<pre>      ! # $ % &amp; ' * + - / = ?  ^ _ ` . { | } ~</pre>
<p>period (&#8220;.&#8221;) may also appear, but may not be used to start or end the    local part, nor may two or more consecutive periods appear.</p></blockquote>
<p>&#8220;alphabetic characters&#8221; are &#8220;a-zA-Z&#8221;, digits are &#8220;0-9&#8243;, and special characters appear as above, in PHP based regex, the combination or &#8220;comb&#8221; for short, looks like this:</p>
<blockquote><p>$comb        = &#8216;[a-zA-Z0-9!#$%&amp;\'*+\/=?^`{|}~.-]&#8216;;</p></blockquote>
<p>You&#8217;ll notice that some of the special characters have backslashes (\) next to them, this is to &#8220;escape&#8221; them when being used as a regular expression, as they normally hold special meaning. Also the dash (-) symbol was moved to the end so that it did not act as &#8220;between&#8221;.</p>
<p>Putting this information together, including the bit about periods appearing in the middle, but never two together, that appears like this:</p>
<blockquote><p>$local_part    = &#8220;($comb(?:\.$comb)?)+&#8221;;</p></blockquote>
<p>That&#8217;s the local part done. Now onto the domain part, which we&#8217;ll base on [<a href="http://www.apps.ietf.org/rfc/rfc3696.html#sec-2">RFC3696 Section 2</a>].</p>
<blockquote><p>the labels (words or strings    separated by periods) that make up a domain name must consist of only    the ASCII [ASCII] alphabetic and numeric characters, plus the hyphen. No other symbols or punctuation characters are permitted, nor is    blank space.  If the hyphen is used, it is not permitted to appear at    either the beginning or end of a label.  There is an additional rule    that essentially requires that top-level domain names not be all-    numeric.</p></blockquote>
<blockquote><p>Most internet applications that reference other hosts or systems    assume they will be supplied with &#8220;fully-qualified&#8221; domain names,    i.e., ones that include all of the labels leading to the root,    including the TLD name.  Those fully-qualified domain names are then    passed to either the domain name resolution protocol itself or to the    remote systems.  Consequently, purported DNS names to be used in    applications and to locate resources generally must contain at least    one period (&#8220;.&#8221;) character.</p>
<p>A DNS label may be no more than 63 octets long.</p></blockquote>
<p>Although it doesn&#8217;t say it as such in [RFC3696], we are on the understanding that periods cannot appear at the start or end of a domain name, but that is of course because periods are only used to &#8220;separate labels&#8221;.</p>
<p>When building this I had some issues to overcome&#8230;</p>
<ul>
<li>DNS labels cannot start or end with a dash (-), however two or more are allowed together in a label.</li>
<li>TLDs cannot be &#8220;all numerics&#8221;, TLDs are generally all alphabetical, APART from IDN TLDs, which start with &#8220;xn--&#8221;, followed by a string of ASCII characters. This does throw a spanner in the works, however, there&#8217;s one consistency which is seen throughout, which is that all valid TLDs always start with at least 1 alphabetical character, this is what we will check for.</li>
<li>TLDs are generally between 2 and 6 characters, IDN TLDs changes all this, as I have seen IDN TLDs as long as 18 characters in length, the RFC, however says 63.</li>
<li>A label can be 1 character long.</li>
</ul>
<p>Finally, we need to ensure that the length is correct. For this we need to read the [<a href="http://www.rfc-editor.org/errata_search.php?rfc=3696">RFC3696 errata</a>].</p>
<blockquote>
<pre class="rfctext">   In addition to restrictions on syntax, there is a length limit on
   email addresses.  That limit is a maximum of 64 characters (octets)
   in the "local part" (before the "@") and a maximum of 255 characters
   (octets) in the domain part (after the "@") for a total length of 320
   characters. However, there is a restriction in RFC 2821 on the length of an
   address in MAIL and RCPT commands of 256 characters.  Since addresses
   that do not fit in those fields are not normally useful, the upper
   limit on address lengths should normally be considered to be 256.</pre>
</blockquote>
<p>When it comes to dealing with lengths in regular expressions, it can often become very confusing, so I wrote this little peice of advice to refer to&#8230;</p>
<blockquote><p>(it){X,Y} means &#8220;see it between X and Y more times&#8221;</p></blockquote>
<p>What we need to do in terms of length is as follows:</p>
<ul>
<li>The &#8220;local-part&#8221; total length must be no longer than 64 characters.</li>
<li>The &#8220;domain-part&#8221; total length must be no longer than 255 characters.</li>
<li>Each &#8220;dns-label&#8221; total length must be no longer than 63 characters.</li>
<li>The entire &#8220;email address&#8221; total length must be no longer than 256 characters.</li>
</ul>
<p>Put this together with the fact that certain elements cannot start or end with certain characters, it makes it difficult to correctly place the end check. Here&#8217;s a run down of that:</p>
<ul>
<li>The &#8220;local-part&#8221; cannot start or end with a period (.)</li>
<li>The &#8220;local-part&#8221; must not have two periods together</li>
<li>A &#8220;dns-label&#8221; cannot start or end with a dash (-)</li>
</ul>
<p>I found that I was unable to satisfy both the lengths and the character placements in a single regular expression. This forced me to make a decision, I could have one or the other, or neither.</p>
<p>I figured that lengths actually hold very little value in validation. Providing the email looks right specific lengths won&#8217;t matter. Besides, we don&#8217;t need regular expressions in order to check lengths, it&#8217;s a very simple principle. It&#8217;s also worth noting that I discovered the local part <a href="mailto:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@mailinator.com">CAN be over 64 characters</a>, <a href="http://www.mailinator.com/maildir.jsp?email=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;x=0&amp;y=0">check it out</a>.</p>
<p>After playing around with dots and dashes in various places in email addresses on various servers and clients I soon discovered that it wasn&#8217;t as strict as I had first perceived. I found many examples of dots and dashes where they shouldn&#8217;t be, mainly at on the end of dns-labels (such as &#8220;x-.x.com&#8221;). Ultimately, at least for the &#8220;local-part&#8221;, it&#8217;s down to the user. For both parts verification should be used instead.</p>
<p>So now the local-part now looks like this:</p>
<blockquote><p>$local_part    = &#8220;[a-zA-Z0-9!#\$%&amp;\'\*\+\/=\?\^_`\{\|\}~\.-]+&#8221;;</p></blockquote>
<p>And FINALLY, the domain part looks like this:</p>
<blockquote><p>$consists    = &#8216;[a-zA-Z0-9][a-zA-Z0-9-]*&#8217;;<br />
$label        = &#8220;(?:$consists(?:\.$consists)?)&#8221;;<br />
$tldlabel    = &#8220;(?:[a-zA-Z][a-zA-Z0-9-]+)&#8221;;<br />
$domain        = &#8220;$label\.$tldlabel&#8221;;</p></blockquote>
<p>We now need to bring the two parts back together, separated by an at-sign (@)&#8230;</p>
<blockquote><p>$addr_spec=&#8221;$local_part@$domain&#8221;;</p></blockquote>
<p>Once you&#8217;ve added the syntax to match the start and end position, the resulting regular expression, looks something like this:</p>
<blockquote><p>/^[a-zA-Z0-9!#$%&amp;\'*+\/=?^_`{|}~.-]+@(?:[a-zA-Z0-9][a-zA-Z0-9-]*(?:\.[a-zA-Z0-9][a-zA-Z0-9-]*)?)+\.(?:[a-zA-Z][a-zA-Z0-9-]+)$/i</p></blockquote>
<p>I&#8217;m sure some of you have probably been shouting all the way through this saying that you can shorten the regex, I purposely didn&#8217;t do this to make it easier to follow. However you can shorten [a-zA-Z] by using the &#8220;case insensitive&#8221; modifier allowing you to remove &#8220;A-Z&#8221;, it also might be worth noting that you can use &#8220;\d&#8221; instead of &#8220;0-9&#8243;.</p>
<p>Here&#8217;s what I did:</p>
<blockquote><p>$addr_spec=str_replace(&#8216;a-zA-Z&#8217;,'a-z&#8217;,$addr_spec);<br />
$addr_spec=str_replace(&#8216;0-9&#8242;,&#8217;\d&#8217;,$addr_spec);</p></blockquote>
<p>You may also wish to take it further and consider replacing &#8220;a-z\d&#8221; with &#8220;\w&#8221;, and also removing the extra &#8220;_&#8221;, since &#8220;\w&#8221; means word, which includes &#8220;a-zA-Z0-9_&#8221;.</p>
<p>Here&#8217;s how it looks:</p>
<blockquote><p>/^[\w!#$%&amp;\'*+\/=?^`{|}~.-]+@(?:[a-z\d][a-z\d-]*(?:\.[a-z\d][a-z\d-]*)?)+\.(?:[a-z][a-z\d-]+)$/i</p></blockquote>
<p><strong>Update:</strong> Due to <a href="http://www.php-security.org/MOPB/PMOPB-45-2007.html">recent vulnerabilities</a> in PHP&#8217;s very own email address validation regex (FILTER_VALIDATE_EMAIL) used in the <a href="http://php.net/manual/en/function.filter-var.php">filter_var function</a>, it&#8217;s recommended that you use the /D modifier, that will prevent newlines from matching. ie:</p>
<blockquote><p>/^[\w!#$%&amp;\'*+\/=?^`{|}~.-]+@(?:[a-z\d][a-z\d-]*(?:\.[a-z\d][a-z\d-]*)?)+\.(?:[a-z][a-z\d-]+)$/iD</p></blockquote>
<p><strong>Final thoughts</strong></p>
<p>Learning how to correctly validate an email address has been one of the most stressful and time consuming things i&#8217;ve had to do in web development.</p>
<p>RFCs aren&#8217;t easy to understand, they are a complete minefield, and it results in something that is incomprehensible and unmaintainable.</p>
<p>There&#8217;s a lot that can be said for proper validation, so many people get it wrong, and it can mean the difference between a sale and no sale, but there&#8217;s a difference between doing it properly based strictly on technical specification and doing it properly for real world situations.</p>
<p>In order to validate correctly, you must be in touch with the real world, and not get caught up too much in the technical documentation, otherwise you will find yourself far from the original objective.</p>
<p>Thus a lot can be said about the outdated RFCs, and the people who write them. The technical specification is so far out of touch with reality it does not actually work in practice.</p>
<p>Having said all this, of course validation has it&#8217;s limitations and can only do so much. Once you&#8217;ve validated the email address to the best of your ability without compromising too much resources, verification is the next step.</p>
<p>This article for intent and purpose set out to validate an email address. Although basic levels of verification can be done very easily, I feel that it goes beyond the scope of this article.</p>
<p>For more information with regards to email address verification, I suggest you look into the Simple Mail Transfer Protocol (SMTP), details can be found in [<a href="http://tools.ietf.org/html/rfc2821">RFC2821</a>], you may also be interested in the <a href="http://www.php.net/getmxrr">getmxrr()</a> function. Also consider the use of DNS to verify the domain name.</p>
<p>I hope you&#8217;ve enjoyed reading this article, it took me a long time to complete, and was quite stressful, but I feel satisfied that I am now fully qualified to validate email addresses to a satisfactory level. I hope that now, you are too.</p>
<p>I look forward to your comments.</p>
<p><strong>Resources<br />
</strong></p>
<ul>
<li><a href="http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html">Perl&#8217;s Mail::RFC822::Address</a></li>
<li><a href="http://code.iamcal.com/php/rfc822/rfc2822.phps">Cal&#8217;s is_valid_email_address PHP function</a></li>
<li><a href="http://uk.php.net/manual/en/function.preg-match-all.php#62104">sinful-music.com&#8217;s mime_extract_rfc2822_address</a></li>
<li><a href="http://SimonSlick.com/VEAF/">SimonSlick&#8217;s Validate Email Address Format</a></li>
<li><a href="http://www.santosj.name/php/stop-doing-email-validation-the-wrong-way/">Jacob Santos&#8217;s &#8220;Stop Doing Email Validation the Wrong Way&#8221; rant.</a></li>
<li><a href="http://www.markussipila.info/pub/emailvalidator.php">Validate email addresses using regular expressions</a></li>
<li><a href="http://www.ilovejackdaniels.com/php/email-address-validation/">ilovejackdaniels.com on email address validation</a></li>
</ul>
<p><strong>Update 17/12/09</strong></p>
<p>I have put my regex into a function called <a href="http://hm2k.googlecode.com/svn/trunk/code/php/functions/validate_email.php">validate_email</a> and have created <a href="http://validemail.org/">validemail.org</a> to demonstrate the difficulty of email address validation.</p>
<p>Also, I am advice people not to use PHP&#8217;s filter_var() and FILTER_VALIDATE_EMAIL as according to the <a href="http://svn.php.net/viewvc/php/php-src/trunk/ext/filter/logical_filters.c?view=co&amp;content-type=text%2Fplain">source code</a>, the regex it uses is from a unmaintained PEAR package called <a href="http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm/QuickForm/Rule/Email.php?view=co&amp;content-type=text%2Fplain">HTML_QuickForm</a>, which has been superseded by HTML_QuickForm2, which does not validate email addresses. This means nobody is assigned to maintaining the PHP&#8217;s own email validation.</p>
<p>Instead, I recommend using my <a href="http://hm2k.googlecode.com/svn/trunk/code/php/functions/validate_email.php">validate_email</a> function which is not only maintained but also adheres to RFC 760 which states: &#8220;In general, an implementation should be conservative in its sending behavior, and liberal in its receiving behavior&#8221;. Also known as the <a href="http://en.wikipedia.org/wiki/Robustness_principle">Robustness principle</a>.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 7634px; width: 1px; height: 1px;">
<pre>validate_emailvalidate_email</pre>
</div>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/email-address-on-your-website' rel='bookmark' title='Permanent Link: email address on your website'>email address on your website</a> <small>This is something that people don&#8217;t seem to realise, and...</small></li>
<li><a href='http://www.hm2k.com/posts/tracking-an-ip-address' rel='bookmark' title='Permanent Link: Tracking an IP address'>Tracking an IP address</a> <small>In my job I have to manage lots of machines...</small></li>
<li><a href='http://www.hm2k.com/posts/fax-to-email' rel='bookmark' title='Permanent Link: Fax to email'>Fax to email</a> <small>Fax to email is perhaps one of the most interesting,...</small></li>
<li><a href='http://www.hm2k.com/posts/start-your-own-free-email-service' rel='bookmark' title='Permanent Link: Start your own free email service'>Start your own free email service</a> <small>I have been interested in starting my own free email...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/what-is-a-valid-email-address/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Inveis.com .cn domain scam</title>
		<link>http://www.hm2k.com/posts/inveiscom-cn-domain-scam</link>
		<comments>http://www.hm2k.com/posts/inveiscom-cn-domain-scam#comments</comments>
		<pubDate>Tue, 08 Apr 2008 19:51:57 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/?p=183</guid>
		<description><![CDATA[Today I received the following email from toby.yang@inveis.com&#8230;
[Note: If you also received this email, it's spam, my advice is to delete it!]

From toby.yang@inveis.com Wed Apr 02 07:58:16 2008
Received: from mxvip26.hichina.com ([218.106.248.76])
by peach.[host].com with esmtp (Exim 4.68)
(envelope-from &#60;toby.yang@inveis.com&#62;)
id 1JgwvB-0000vO-6L
for info@[host].co.uk; Wed, 02 Apr 2008 07:58:16 +0100
Received: from 125.33.195.130 (HELO WWW-49DC599EB58) (envelope-from toby.yang@inveis.com)
by mxvip26.hichina.com (quarkmail-1.2.1) with ESMTP [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/focus-on-one-domain' rel='bookmark' title='Permanent Link: Focus on one domain'>Focus on one domain</a> <small>Why you should be focusing on one domain name for...</small></li>
<li><a href='http://www.hm2k.com/posts/transfering-domains-from-godaddycom-to-tucows-opensrs' rel='bookmark' title='Permanent Link: Transfering domains from Godaddy.com to TuCows OpenSRS'>Transfering domains from Godaddy.com to TuCows OpenSRS</a> <small>I need to transfer a bunch of domains from Godaddy...</small></li>
<li><a href='http://www.hm2k.com/posts/does-registering-a-domain-for-a-longer-term-increase-your-search-engine-rankings' rel='bookmark' title='Permanent Link: Does registering a domain for a longer term increase your search engine rankings?'>Does registering a domain for a longer term increase your search engine rankings?</a> <small>Recently I come across a claim by Network Solutions stating:...</small></li>
<li><a href='http://www.hm2k.com/posts/mp4-player' rel='bookmark' title='Permanent Link: 4GB Mp4 Player ebay Scam'>4GB Mp4 Player ebay Scam</a> <small>Just before Christmas, I decided I was going to get...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Today I received the following email from toby.yang@inveis.com&#8230;</p>
<p>[Note: If you also received this email, it's spam, my advice is to delete it!]</p>
<p><span id="more-183"></span></p>
<blockquote><p>From toby.yang@inveis.com Wed Apr 02 07:58:16 2008<br />
Received: from mxvip26.hichina.com ([218.106.248.76])<br />
by peach.[host].com with esmtp (Exim 4.68)<br />
(envelope-from &lt;toby.yang@inveis.com&gt;)<br />
id 1JgwvB-0000vO-6L<br />
for info@[host].co.uk; Wed, 02 Apr 2008 07:58:16 +0100<br />
Received: from 125.33.195.130 (HELO WWW-49DC599EB58) (envelope-from toby.yang@inveis.com)<br />
by mxvip26.hichina.com (quarkmail-1.2.1) with ESMTP id S4192785AbYDBG6B<br />
for info@[host].co.uk; Wed, 2 Apr 2008 14:58:01 +0800<br />
Date: Wed, 2 Apr 2008 15:01:52 +0800<br />
From: &#8220;toby.yang&#8221; &lt;toby.yang@inveis.com&gt;<br />
To: &#8220;info&#8221; &lt;info@[host].co.uk&gt;<br />
Subject: Phurix.   domain name<br />
Message-ID: &lt;200804021501517814410@inveis.com&gt;<br />
X-mailer: Foxmail 6, 10, 201, 20 [cn]<br />
Mime-Version: 1.0<br />
Content-Type: multipart/alternative;<br />
boundary=&#8221;=====003_Dragon171030833688_=====&#8221;<br />
X-Spam-Status: No, score=2.1<br />
X-Spam-Score: 21<br />
X-Spam-Bar: ++<br />
X-Spam-Flag: NO</p>
<p>Dear {tradename}.：</p>
<p>We are Beijing Inveis Network Information Technology Co.,Ltd which is the domain name register center in China.</p>
<p>We received a formal application from a company who is applying to register “{tradename}” as their domain names and Internet keyword on Apr 1st, 2008. Because this involved your company name or trade mark so we inform you in no time. If you considered these domain names and internet keyword are important to you and there was necessary to protect them by registering them first, contact us soon.</p>
<p>Kind</p>
<p>Regards,</p>
<p>Toby.Yang</p>
<p>Tel:</p>
<p>+86-10-82476192 (ext.612)</p>
<p>Fax: +86-10-62477798</p>
<p>Email: toby,yang@Inveis.com</p>
<p>Beijing</p>
<p>Inveis Network Information Technology Co.,Ltd</p>
<p>website:</p>
<p><a rel="nofollow" href="http://www.inveis.com/">www.Inveis.com</a></p></blockquote>
<p>Upon closer inspection I realise they don&#8217;t specify the domain extension, I visited their website to investigate further. Their main page contains statistical information about .cn domain names, which is the ccTLD for China.</p>
<p>It&#8217;s a nice idea, it looks like a legit email, and it plays on trademark law, which states that you MUST defend your trademark in order to maintain it.</p>
<p>However, the first thing I notice as odd is the , they use in the email address, then the fact they didn&#8217;t specify the domain these people are trying to register, and I&#8217;ve never heard of them.</p>
<p>A quick google of &#8220;Inveis.com&#8221; finds a blog post entitled &#8220;<a href="http://www.mufaka.com/post/2008/03/Domain-scam.aspx">Domains scam</a>&#8220;.</p>
<p>Apparently, they will register your domain under .cn and try to sell it back to you if you respond with any concerns over your domain name.</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/focus-on-one-domain' rel='bookmark' title='Permanent Link: Focus on one domain'>Focus on one domain</a> <small>Why you should be focusing on one domain name for...</small></li>
<li><a href='http://www.hm2k.com/posts/transfering-domains-from-godaddycom-to-tucows-opensrs' rel='bookmark' title='Permanent Link: Transfering domains from Godaddy.com to TuCows OpenSRS'>Transfering domains from Godaddy.com to TuCows OpenSRS</a> <small>I need to transfer a bunch of domains from Godaddy...</small></li>
<li><a href='http://www.hm2k.com/posts/does-registering-a-domain-for-a-longer-term-increase-your-search-engine-rankings' rel='bookmark' title='Permanent Link: Does registering a domain for a longer term increase your search engine rankings?'>Does registering a domain for a longer term increase your search engine rankings?</a> <small>Recently I come across a claim by Network Solutions stating:...</small></li>
<li><a href='http://www.hm2k.com/posts/mp4-player' rel='bookmark' title='Permanent Link: 4GB Mp4 Player ebay Scam'>4GB Mp4 Player ebay Scam</a> <small>Just before Christmas, I decided I was going to get...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/inveiscom-cn-domain-scam/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>email address on your website</title>
		<link>http://www.hm2k.com/posts/email-address-on-your-website</link>
		<comments>http://www.hm2k.com/posts/email-address-on-your-website#comments</comments>
		<pubDate>Mon, 11 Jun 2007 13:23:16 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/posts/email-address-on-your-website</guid>
		<description><![CDATA[This is something that people don&#8217;t seem to realise, and although I tell them over and over it seems to go ignored.
DO NOT PUT YOUR EMAIL ADDRESS ON YOUR WEBSITE
The reason is that spam bots crawl websites and gather email addresses, then place them into a list ready to spam.
People often ask me how to [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/what-is-a-valid-email-address' rel='bookmark' title='Permanent Link: What is a valid email address?'>What is a valid email address?</a> <small>With the on-going abuse to email based systems, we are...</small></li>
<li><a href='http://www.hm2k.com/posts/start-your-own-free-email-service' rel='bookmark' title='Permanent Link: Start your own free email service'>Start your own free email service</a> <small>I have been interested in starting my own free email...</small></li>
<li><a href='http://www.hm2k.com/posts/fax-to-email' rel='bookmark' title='Permanent Link: Fax to email'>Fax to email</a> <small>Fax to email is perhaps one of the most interesting,...</small></li>
<li><a href='http://www.hm2k.com/posts/inveiscom-cn-domain-scam' rel='bookmark' title='Permanent Link: Inveis.com .cn domain scam'>Inveis.com .cn domain scam</a> <small>Today I received the following email from toby.yang@inveis.com&#8230; [Note: If...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is something that people don&#8217;t seem to realise, and although I tell them over and over it seems to go ignored.</p>
<p align="center"><strong>DO NOT PUT YOUR EMAIL ADDRESS ON YOUR WEBSITE</strong></p>
<p>The reason is that spam bots crawl websites and gather email addresses, then place them into a list ready to spam.</p>
<p><span id="more-121"></span>People often ask me how to overcome this issue, I mainly use the following 3 methods:</p>
<ol>
<li>Add removable tags. (eg: web@[-REMOVE-]hm2k.org)</li>
<li>Images &#8211; Simply turn your email address into an image and include it on your site, be warned however, some spam bots use OCR, but not very often as it uses lots of resources.</li>
<li>Forms &#8211; One of the best methods, because your email address is never visible, however forms can be spammed.</li>
</ol>
<p>For those with some PHP skills here&#8217;s a simple script I made, you can use to render your email addresses, as per option 2:</p>
<blockquote>
<pre>&lt;?php

$string=$_GET['text'];
$fixedhost=str_replace('www.','',$_SERVER['HTTP_HOST']);

//check for string
if (!$string) { die(); }
$string=$string.'@'.$fixedhost;

//ensure no caching by browser - START
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); //A Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // no cache for HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false); // no cache for HTTP/1.1
header("Pragma: no-cache"); // no cache for HTTP/1.0
//ensure no caching by browser - END

//output the image
header('Content-type: image/gif'); // tell the browser that this is an image

//Create the image
$font  = 3;
$width  = ImageFontWidth($font)* strlen($string);
$height = ImageFontHeight($font);
$im = ImageCreate($width,$height);

$x=imagesx($im)-$width ;
$y=imagesy($im)-$height;
$background_color = imagecolorallocate ($im, 242, 242, 242); //white background
$text_color = imagecolorallocate ($im, 0, 0,0);//black text
$trans_color = $background_color;//transparent colour
imagecolortransparent($im, $trans_color);
imagestring ($im, $font, $x, $y,  $string, $text_color);

imagegif($im);
ImageDestroy($im); 

?&gt;</pre>
</blockquote>
<p>Update: I recently also write some javascript that is not easily detectable by the spam bots&#8230;</p>
<blockquote><p>&lt;script language=&#8221;JavaScript&#8221; type=&#8221;text/javascript&#8221;&gt;<br />
&lt;!&#8211;<br />
var who = &#8216;info&#8217;;<br />
var at = &#8216;@&#8217;;<br />
URL=self.location.href;<br />
prefix=URL.substring(0,URL.indexOf(&#8216;.&#8217;)+1);<br />
URLremain=URL.substring(prefix.length,URL.length);<br />
domain=&#8221;;<br />
if((prefix==&#8217;http://www.&#8217;) || (prefix==&#8217;www.&#8217;)) {<br />
domain=URLremain.substring(0,URLremain.indexOf(&#8216;/&#8217;));<br />
}<br />
else {<br />
prefix2=URL.substring(0,7);<br />
if (prefix2==&#8217;http://&#8217;) {<br />
URLremain2=URL.substring(prefix2.length,URL.length);<br />
domain=URLremain2.substring(0,URLremain2.indexOf(&#8216;/&#8217;));<br />
}<br />
else{ domain=URL.substring(0,URL.indexOf(&#8216;/&#8217;)); }<br />
}<br />
document.write(who + at + domain);<br />
//&#8211;&gt;<br />
&lt;/script&gt;</p></blockquote>
<p>It pulls the domain name automatically, ideal for many simple sites.</p>
<p>There are plenty of other techniques, csarven has a very nice article detailing these, called <a href="http://www.csarven.ca/hiding-email-addresses">hiding email addresses</a>.</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/what-is-a-valid-email-address' rel='bookmark' title='Permanent Link: What is a valid email address?'>What is a valid email address?</a> <small>With the on-going abuse to email based systems, we are...</small></li>
<li><a href='http://www.hm2k.com/posts/start-your-own-free-email-service' rel='bookmark' title='Permanent Link: Start your own free email service'>Start your own free email service</a> <small>I have been interested in starting my own free email...</small></li>
<li><a href='http://www.hm2k.com/posts/fax-to-email' rel='bookmark' title='Permanent Link: Fax to email'>Fax to email</a> <small>Fax to email is perhaps one of the most interesting,...</small></li>
<li><a href='http://www.hm2k.com/posts/inveiscom-cn-domain-scam' rel='bookmark' title='Permanent Link: Inveis.com .cn domain scam'>Inveis.com .cn domain scam</a> <small>Today I received the following email from toby.yang@inveis.com&#8230; [Note: If...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/email-address-on-your-website/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Start your own free email service</title>
		<link>http://www.hm2k.com/posts/start-your-own-free-email-service</link>
		<comments>http://www.hm2k.com/posts/start-your-own-free-email-service#comments</comments>
		<pubDate>Tue, 06 Mar 2007 18:26:05 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/posts/start-your-own-free-email-service</guid>
		<description><![CDATA[I have been interested in starting my own free email service for some time now.
Over the years i&#8217;ve seen free email services such as hotmail.com, yahoo, and now gmail.com, to name just a few of the many thousands out there.
First of all, most people would think that this is a saturated market, and you would [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/fax-to-email' rel='bookmark' title='Permanent Link: Fax to email'>Fax to email</a> <small>Fax to email is perhaps one of the most interesting,...</small></li>
<li><a href='http://www.hm2k.com/posts/free-stuff' rel='bookmark' title='Permanent Link: Free Stuff'>Free Stuff</a> <small>I love free stuff, it&#8217;s probably why I like open...</small></li>
<li><a href='http://www.hm2k.com/posts/email-address-on-your-website' rel='bookmark' title='Permanent Link: email address on your website'>email address on your website</a> <small>This is something that people don&#8217;t seem to realise, and...</small></li>
<li><a href='http://www.hm2k.com/posts/legally-listen-to-music-online-for-free' rel='bookmark' title='Permanent Link: Legally listen to music online for free'>Legally listen to music online for free</a> <small>One of the things I enjoy doing while I work...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I have been interested in starting my own free email service for some time now.</p>
<p>Over the years i&#8217;ve seen free email services such as hotmail.com, yahoo, and now gmail.com, to name just a few of the many thousands out there.</p>
<p><span id="more-100"></span>First of all, most people would think that this is a saturated market, and you would be correct to think that. However, you must look at possibly the most successful email service and one of the most successful portal websites to understand how webmail can be utilised to keep your users coming back time and time again.</p>
<p>This is one of the reason Yahoo! become such a hit, they offer free email and their users keep returning. Yahoo became a community portal very quickly and people are proud to say they are a member. If this is the effect of free email, then what are the options?</p>
<p>For me, i&#8217;m only really interested in offering this to a very limited audience. The reason being is that spam is very difficult to defend against, and spam protection can be expensive. Throughout the whole process of finding a solution I will be ensuring that the issue of &#8220;automated&#8221; signups is covered and &#8220;anti-spam&#8221; measures are in place.</p>
<p>One of the first things I looked at was the free email services that offer the ability to use your own domain. There has been a couple or so for many years (since about 1998). They are:</p>
<ul>
<li><a href="http://www.i-p.com/">I-P.com</a> (run by Outblaze)</li>
<li><a href="http://www.everyone.net/">Everyone.net</a></li>
<li><a href="http://www.zapzone.com/">Zap Zone Network</a></li>
<li><a href="http://www.cgispy.com/scripts/emailserv.shtml">CGISpy.com</a></li>
</ul>
<p>This is all very well, however, the problem arrises when you begin to use the service and you realise that their branding is all over the place all over your emails. It makes you look unprofessional. However since it is a free service they must get something in return to cover their cost.</p>
<p>If you&#8217;re looking for a free email hosting service that has been around for quite some time, is quite flexable, and doesn&#8217;t require any server administration but is branded, then these are for you.</p>
<p>I&#8217;ve tried both of them in the past, I-P.com was very simple to work with, but began experiencing issues with automated signups and spam some years ago. I&#8217;m assuming they have overcome these issues now.</p>
<p>Everyone.net as I recall has elongated terms and conditions, and is a little bit more complicated. However I am on the understanding that they have a stronger anti-spam protection.</p>
<p>On the other hand, more recently Google and Microsoft have put a bid in for a battle to offer free services for domains&#8230;</p>
<ul>
<li> <a href="http://www.google.com/a/">Google Apps</a> offers Gmail, Google Talk, Google Calendar, Docs &amp; Spreadsheets, Page Creator and Start Page</li>
<li><a href="http://domains.live.com/">Microsoft Live</a> offers easily create custom Windows Live accounts in your domain that work with Windows Live and MSN services.</li>
</ul>
<p>Of cource the great thing about this is that your domain is able to use their services completely free of charge. One thing you have to understand is that the moment you start using their services your subject to their terms and policies which you may not always agree with, yet will be unable to do anything about it.</p>
<p>If you&#8217;re looking for security with a well known company, not bothered about their branding and very little to think about this is probably the best option for you.</p>
<p>However, if you&#8217;re like me you want more than that, something that you&#8217;re able to remain in control and not forced into using someone else&#8217;s branding, then this is where we pickup&#8230;</p>
<p>In this part of the free email service options there&#8217;s two choices&#8230; purchase or open source&#8230;</p>
<p>The difficulty is that to find a pre-build email service that has webmail, allows users to signup and offers adminisitration is quite hard to come by, here&#8217;s a list of a few&#8230;</p>
<ul>
<li><a href="http://www.hivemail.com/">hivemail</a> claims it is a powerful web-based email program that allows you to offer personal email accounts to your site visitors. [$130/$180 setup and $35/year]<a href="http://atmail.com/"><br />
</a></li>
<li><a href="http://atmail.com/">atmail</a> famously known to be used by spymac.com the first &#8220;open-to-public&#8221; email service to offer 1GB of space. [Various Prices]</li>
<li><a href="http://www.socketmail.com/site/home/">SocketMail</a> &#8211; Didn&#8217;t try it.</li>
<li><a href="http://www.b1g.de/">B1G</a> &#8211; I couldn&#8217;t figure this out as it was German.</li>
<li><a href="http://www.dominion-web.com/products/dwmail/purchase.php">DWmail</a> &#8211; I didn&#8217;t try this, but it looks okay. [£70 for professional]</li>
</ul>
<p>And asif it wasn&#8217;t hard enough to find such email service, I&#8217;ve located just a few free ones&#8230;</p>
<ul>
<li>With a combonation of <a href="http://cr.yp.to/qmail.html">qmail</a>, <a href="http://www.inter7.com/index.php?page=vpopmail">vpopmail</a>, <a href="http://www.inter7.com/index.php?page=qmailadmin">qmailadmin</a> and <a href="http://www.inter7.com/index.php?page=vqregister">vqregister</a>/<a href="http://www.inter7.com/index.php?page=vqsignup">vqsignup</a>, it can be achieved. All you need then is a webmail interface (such as <a href="http://www.squirrelmail.org/">SquirrelMail</a> with <a href="http://nutsmail.com/bluehive_skin.htm">a nice theme</a> or <a href="http://sourceforge.net/projects/roundcubemail/">RoundCube</a>).</li>
<li>Using Squirrel Mail and a solution by uoa.gr they have created the ability to <a href="http://email.uoa.gr/projects/squirrelmail/demo.php">signup to Squirrel Mail</a> on their servers.</li>
</ul>
<p>All this aside, there might be light at the end of the tunnel. Since hivemail hasn&#8217;t been updated since v1.3.1 in 2004, the folk from RoundCube have talked about merging the projects into an open source solution. Having said this, Kevin who owns the trademark to HiveMail has said he <a href="http://forum.hivemail.com/showthread.php?t=4982">&#8220;don&#8217;t ask me to make HiveMail an open-source project or distribute it for free&#8221;</a>.</p>
<p>In my opinion, if hivemail doesn&#8217;t see the light and jump on this while they still can, someone out there will create an open     source product that has has the same features, and then some. I mean, people have already started releasing their own <a href="http://www.hive2.com/">HiveMail updates</a>. Its only a matter of time before the whole thing is redone&#8230; If HiveMail want to keep their userbase, they need to sort themselves out.</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/fax-to-email' rel='bookmark' title='Permanent Link: Fax to email'>Fax to email</a> <small>Fax to email is perhaps one of the most interesting,...</small></li>
<li><a href='http://www.hm2k.com/posts/free-stuff' rel='bookmark' title='Permanent Link: Free Stuff'>Free Stuff</a> <small>I love free stuff, it&#8217;s probably why I like open...</small></li>
<li><a href='http://www.hm2k.com/posts/email-address-on-your-website' rel='bookmark' title='Permanent Link: email address on your website'>email address on your website</a> <small>This is something that people don&#8217;t seem to realise, and...</small></li>
<li><a href='http://www.hm2k.com/posts/legally-listen-to-music-online-for-free' rel='bookmark' title='Permanent Link: Legally listen to music online for free'>Legally listen to music online for free</a> <small>One of the things I enjoy doing while I work...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/start-your-own-free-email-service/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Fax to email</title>
		<link>http://www.hm2k.com/posts/fax-to-email</link>
		<comments>http://www.hm2k.com/posts/fax-to-email#comments</comments>
		<pubDate>Fri, 02 Feb 2007 17:28:57 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Telecomms]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/posts/fax-to-email</guid>
		<description><![CDATA[Fax to email is perhaps one of the most interesting, oldest and most overlooked technology.
These days although it seems like everyone has an email address, there are businesses that rely on their fax machine asif its their only means of communication to the outside world.
However, we can&#8217;t always be around to man a fax machine [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/email-address-on-your-website' rel='bookmark' title='Permanent Link: email address on your website'>email address on your website</a> <small>This is something that people don&#8217;t seem to realise, and...</small></li>
<li><a href='http://www.hm2k.com/posts/start-your-own-free-email-service' rel='bookmark' title='Permanent Link: Start your own free email service'>Start your own free email service</a> <small>I have been interested in starting my own free email...</small></li>
<li><a href='http://www.hm2k.com/posts/what-is-a-valid-email-address' rel='bookmark' title='Permanent Link: What is a valid email address?'>What is a valid email address?</a> <small>With the on-going abuse to email based systems, we are...</small></li>
<li><a href='http://www.hm2k.com/posts/transfering-domains-from-godaddycom-to-tucows-opensrs' rel='bookmark' title='Permanent Link: Transfering domains from Godaddy.com to TuCows OpenSRS'>Transfering domains from Godaddy.com to TuCows OpenSRS</a> <small>I need to transfer a bunch of domains from Godaddy...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Fax to email is perhaps one of the most interesting, oldest and most overlooked technology.</p>
<p>These days although it seems like everyone has an email address, there are businesses that rely on their fax machine asif its their only means of communication to the outside world.</p>
<p>However, we can&#8217;t always be around to man a fax machine 24/7/365, so usually you&#8217;re left with a number of options:</p>
<ul>
<li>Wait until you return so you can check your fax machine</li>
<li>Get someone else to check your fax machine, then send them to your current location</li>
<li>Tell people sending the fax to send to a different number depending on your location at the time</li>
<li>Tell them to scan it in and email it to you</li>
<li>Tell them not to bother at all</li>
</ul>
<p>As you are probably aware for businesses that are none stop 24/7, if you are unable to reach critical information it is possible to loose business.</p>
<p>There is really only one solution&#8230;</p>
<p>That is you must have a computer, broadband, a fax modem, a phone line, and a piece of software to tie it all together.</p>
<p>The software you require must do the following functions:</p>
<ul>
<li>Receive faxes</li>
<li>Send faxes via email.</li>
<li>Distinguish the difference between voice calls and faxes</li>
<li>Act as an answering machine if a voice call is received</li>
<li>Have some method of remotely accessing or sending voice messages</li>
</ul>
<p>So far the only software I have found that will do this task is called <a href="http://www.faxtalk.com/">FaxTalk</a>, in particular FaxTalk Messenger Pro 7. This software is GREAT! It has the following features:</p>
<ul>
<li>Complete voice messaging and fax solution.</li>
<li>Access contacts from Microsoft Outlook 2000/2002/2003 and Windows Address Book.</li>
<li>Send faxes over the internet to any email address.</li>
<li>Forward received faxes and messages by email.</li>
<li>Access received faxes and voice messages in Microsoft Outlook.</li>
<li>Receive calls and send faxes when logged out of Windows 2000/XP.</li>
<li>Block the reception of unwanted junk faxes.</li>
<li>Process received voice messages and faxes using notification rules.</li>
</ul>
<p>And so much more, the list is endless! This is the ultimate solution.</p>
<p>However I didn&#8217;t stop there&#8230;</p>
<p>I also looked other fax to email solutions including fax gateways.</p>
<p>Tiscali offer a <a href="http://fax.tiscali.co.uk/">fax gateway</a> to all of their members, and since its free to <a href="http://www.tiscali.co.uk/products/jump/websitemembership.html">signup to Tiscali</a>, its available to anyone. Once your signed up and logged in, you simply assign yourself a new number and you can receive faxes via email/webmail via your new number as of immediate effect.</p>
<p>There are many other broadband providers (such as <a href="http://www.demon.net/toolkit/electronicfax/">Demon</a>) that offer a similar service free providing you have a business broadband package with them, unlike BT, who simply are unaware of such a service.</p>
<p>Another fax gateway to have a look at is <a href="http://www.yac.com/">yac.com</a>, apparently its free!</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/email-address-on-your-website' rel='bookmark' title='Permanent Link: email address on your website'>email address on your website</a> <small>This is something that people don&#8217;t seem to realise, and...</small></li>
<li><a href='http://www.hm2k.com/posts/start-your-own-free-email-service' rel='bookmark' title='Permanent Link: Start your own free email service'>Start your own free email service</a> <small>I have been interested in starting my own free email...</small></li>
<li><a href='http://www.hm2k.com/posts/what-is-a-valid-email-address' rel='bookmark' title='Permanent Link: What is a valid email address?'>What is a valid email address?</a> <small>With the on-going abuse to email based systems, we are...</small></li>
<li><a href='http://www.hm2k.com/posts/transfering-domains-from-godaddycom-to-tucows-opensrs' rel='bookmark' title='Permanent Link: Transfering domains from Godaddy.com to TuCows OpenSRS'>Transfering domains from Godaddy.com to TuCows OpenSRS</a> <small>I need to transfer a bunch of domains from Godaddy...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/fax-to-email/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Exporting emails with the dates from Microsoft Outlook</title>
		<link>http://www.hm2k.com/posts/exporting-emails-with-the-dates-from-microsoft-outlook</link>
		<comments>http://www.hm2k.com/posts/exporting-emails-with-the-dates-from-microsoft-outlook#comments</comments>
		<pubDate>Sun, 21 Jan 2007 11:28:18 +0000</pubDate>
		<dc:creator>hm2k</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.hm2k.com/posts/exporting-emails-with-the-dates-from-microsoft-outlook</guid>
		<description><![CDATA[The Problem:
By default when you try and export emails from Outlook, there are NO dates.
I wanted to export emails in a certain folder from outlook so I could then import the data into a database such as MySQL for further manipulation.
When I tried to export the emails, outlook would NOT export any of the header [...]


Related posts:<ol><li><a href='http://www.hm2k.com/posts/how-to-minimize-microsoft-office-outlook-to-the-system-tray' rel='bookmark' title='Permanent Link: How to Minimize Microsoft Office Outlook to the System Tray'>How to Minimize Microsoft Office Outlook to the System Tray</a> <small>Open your registry and find or create the key below....</small></li>
<li><a href='http://www.hm2k.com/posts/print-dialog-does-not-appear' rel='bookmark' title='Permanent Link: Print dialog does not appear in Outlook Express or Internet Explorer'>Print dialog does not appear in Outlook Express or Internet Explorer</a> <small>Today I get a call. Outlook Express won&#8217;t print. I...</small></li>
<li><a href='http://www.hm2k.com/posts/domain-example-com-has-exceeded-the-max-emails-per-hour-200-allowed-message-discarded' rel='bookmark' title='Permanent Link: Domain example.com has exceeded the max emails per hour (200) allowed. Message discarded.'>Domain example.com has exceeded the max emails per hour (200) allowed. Message discarded.</a> <small>Got this error with cpanel? Domain example.com has exceeded the...</small></li>
<li><a href='http://www.hm2k.com/posts/fax-to-email' rel='bookmark' title='Permanent Link: Fax to email'>Fax to email</a> <small>Fax to email is perhaps one of the most interesting,...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><em><strong>The Problem:</strong></em></p>
<p>By default when you try and export emails from Outlook, there are NO dates.</p>
<p>I wanted to export emails in a certain folder from outlook so I could then import the data into a database such as MySQL for further manipulation.</p>
<p>When I tried to export the emails, outlook would NOT export any of the header details or even something as simple as the date/time.</p>
<p><em><strong><span id="more-44"></span>The Solution:</strong></em></p>
<p>I spent a lot of time trying to find a solution to this.</p>
<p>After much searching I found this solution&#8230;</p>
<p><a href="http://www.topxml.com/snippetcentral/main.asp?view=viewsnippet&amp;lang=xml&amp;id=v20020414223234">http://www.topxml.com/snippetcentral/main.asp?view=viewsnippet〈=xml&amp;id=v20020414223234</a></p>
<blockquote><p>Summary<br />
A set of short code snippets that I developed using Visual Basic for Applications (VBA) and MSXML4 that will export and import Microsoft Outlook objects including contacts, e-mail, notes, and task items. This is code snippet project still very much a work in progress and contributions are certainly welcome.</p>
<p>The code snippets I created here are written in the Visual Basic for Applications, or VBA, programming language included supported by all Microsoft Office applications. In this latest revision (as of February 2003), I updated the routines to include importing of certain Outlook objects such as appointments, contacts and notes. I have also improved the input error handling code. Next steps include more robust handling of fields containing no data. Having schemas associated with XML structured would also be good. Finally, if anyone has any ideas on how to do this reflectively, please let me know (maybe with C# in Outlook 11?).</p></blockquote>
<p>If you are new to VBA, what you need to do first is read <a href="http://www.outlookcode.com/d/vb.htm">this</a>.</p>
<p>Basically what you need to do is hit Alt+F11 to open up the Visual Basic Editor, then you need to use Tools | References to add a reference to the Microsoft XML library. You should be able to use whichever version is the latest.</p>
<p>All you do then is go down the tree to the left, and double click the &#8220;ThisOutlookSession&#8221;. Once this is complete, hopefully you should be able to simply hit Alt+F8 and choose the ExportEmailToXml.</p>
<p>Once this is complete, simply open the xml file into excel, and save as a CVS file, MySQL will easily be able to import CVS files.</p>


<p>Related posts:<ol><li><a href='http://www.hm2k.com/posts/how-to-minimize-microsoft-office-outlook-to-the-system-tray' rel='bookmark' title='Permanent Link: How to Minimize Microsoft Office Outlook to the System Tray'>How to Minimize Microsoft Office Outlook to the System Tray</a> <small>Open your registry and find or create the key below....</small></li>
<li><a href='http://www.hm2k.com/posts/print-dialog-does-not-appear' rel='bookmark' title='Permanent Link: Print dialog does not appear in Outlook Express or Internet Explorer'>Print dialog does not appear in Outlook Express or Internet Explorer</a> <small>Today I get a call. Outlook Express won&#8217;t print. I...</small></li>
<li><a href='http://www.hm2k.com/posts/domain-example-com-has-exceeded-the-max-emails-per-hour-200-allowed-message-discarded' rel='bookmark' title='Permanent Link: Domain example.com has exceeded the max emails per hour (200) allowed. Message discarded.'>Domain example.com has exceeded the max emails per hour (200) allowed. Message discarded.</a> <small>Got this error with cpanel? Domain example.com has exceeded the...</small></li>
<li><a href='http://www.hm2k.com/posts/fax-to-email' rel='bookmark' title='Permanent Link: Fax to email'>Fax to email</a> <small>Fax to email is perhaps one of the most interesting,...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hm2k.com/posts/exporting-emails-with-the-dates-from-microsoft-outlook/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
