<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: I want to send a DB2 file via email from AS400 to MS outlook using MMAIL/SENDMIME command.</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/mmailsendmime/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/mmailsendmime/</link>
	<description></description>
	<lastBuildDate>Tue, 18 Jun 2013 23:43:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/mmailsendmime/#comment-78541</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 24 Jun 2010 19:16:58 +0000</pubDate>
		<guid isPermaLink="false">#comment-78541</guid>
		<description><![CDATA[&lt;i&gt;I want to send this DB2 file as an email attachment.&lt;/i&gt;

Yes, but what kind of attachment are you sending?

SMTP e-mail servers handle ASCII printable characters only. &lt;i&gt;All characters except printable ASCII characters or end of line characters must be encoded as, e.g., quoted-printable or Base64 encoded.&lt;/i&gt; And for MIME attachments, MIME headers need to be generated and included in the SMTP data stream to mark the beginning and end of attachments &lt;i&gt;as well as to indicate the &lt;/i&gt;encoding type&lt;i&gt; of that attachment&lt;/i&gt;.

The whole &quot;MIME&quot;-related area of SMTP e-mail came about because SMTP servers only allow text to pass through. When people wanted to send binary files (e.g., image files) embedded in messages, methods of converting the binary bytes to text characters and back again were developed.

If an attachment contains only ASCII printable text characters, it can be described as text. The attachment will have a name, probably including an extension. Your MIME header and encoding plus the extension that you assign to the name are the only elements that you can control as a sender. The recipient has control over how attachments are handled.

Because of that, you want to be sure that you follow standards. You want to generate attachments with known extensions as much as possible. Your attachments need to be formatted to fit the specifications for the type that you assign.

From your question:

&lt;i&gt;it attaches some .dat file which doesn&#039;t have anything in it.&lt;/i&gt; and &lt;i&gt;the attachment is in notepad,...&lt;/i&gt;

Are you saying that two separate attachments arrive? One attachment is a .DAT file that appears to be empty, and the other attachment is your data file which opens for the recipient in Notepad.

If your data file opens in Notepad, it&#039;s because you are attaching it as a type that the recipient has configured to open in Notepad. What do you want it to open in? If you want it to open in Excel, then generate a .XLS or .CSV file.

If you actually create a .CSV file and it opens in Notepad for the recipient, then it&#039;s because the recipient &lt;i&gt;has configured his e-mail client&lt;/i&gt; to open .CSV files in Notepad. That is under the control of the recipient and there&#039;s nothing you can do to control it. You could include a note in your e-mail that says &quot;Please open the attached .CSV file in Excel&quot;, but you can&#039;t make it happen. Even if you created a true .XLS file, you couldn&#039;t guarantee that it will open in Excel -- it would still open in Notepad if the recipient configured his client to do so.

In short, what kind of attachment are you creating? What kinds of characters does it contain? What MIME type have you assigned?

For me, I have a number of external e-mail accounts. When I&#039;m creating functions to send e-mail, I send examples to a couple of those accounts and download the e-mails into files on a PC. Most e-mail clients let you save e-mail items as files. Then I open the files in Notepad and/or NoteTab and/or WordPad to see everything that was actually included in the physical e-mail item. If you don&#039;t look at the details by yourself, you really can&#039;t know what you are sending.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>I want to send this DB2 file as an email attachment.</i></p>
<p>Yes, but what kind of attachment are you sending?</p>
<p>SMTP e-mail servers handle ASCII printable characters only. <i>All characters except printable ASCII characters or end of line characters must be encoded as, e.g., quoted-printable or Base64 encoded.</i> And for MIME attachments, MIME headers need to be generated and included in the SMTP data stream to mark the beginning and end of attachments <i>as well as to indicate the </i>encoding type<i> of that attachment</i>.</p>
<p>The whole &#8220;MIME&#8221;-related area of SMTP e-mail came about because SMTP servers only allow text to pass through. When people wanted to send binary files (e.g., image files) embedded in messages, methods of converting the binary bytes to text characters and back again were developed.</p>
<p>If an attachment contains only ASCII printable text characters, it can be described as text. The attachment will have a name, probably including an extension. Your MIME header and encoding plus the extension that you assign to the name are the only elements that you can control as a sender. The recipient has control over how attachments are handled.</p>
<p>Because of that, you want to be sure that you follow standards. You want to generate attachments with known extensions as much as possible. Your attachments need to be formatted to fit the specifications for the type that you assign.</p>
<p>From your question:</p>
<p><i>it attaches some .dat file which doesn&#8217;t have anything in it.</i> and <i>the attachment is in notepad,&#8230;</i></p>
<p>Are you saying that two separate attachments arrive? One attachment is a .DAT file that appears to be empty, and the other attachment is your data file which opens for the recipient in Notepad.</p>
<p>If your data file opens in Notepad, it&#8217;s because you are attaching it as a type that the recipient has configured to open in Notepad. What do you want it to open in? If you want it to open in Excel, then generate a .XLS or .CSV file.</p>
<p>If you actually create a .CSV file and it opens in Notepad for the recipient, then it&#8217;s because the recipient <i>has configured his e-mail client</i> to open .CSV files in Notepad. That is under the control of the recipient and there&#8217;s nothing you can do to control it. You could include a note in your e-mail that says &#8220;Please open the attached .CSV file in Excel&#8221;, but you can&#8217;t make it happen. Even if you created a true .XLS file, you couldn&#8217;t guarantee that it will open in Excel &#8212; it would still open in Notepad if the recipient configured his client to do so.</p>
<p>In short, what kind of attachment are you creating? What kinds of characters does it contain? What MIME type have you assigned?</p>
<p>For me, I have a number of external e-mail accounts. When I&#8217;m creating functions to send e-mail, I send examples to a couple of those accounts and download the e-mails into files on a PC. Most e-mail clients let you save e-mail items as files. Then I open the files in Notepad and/or NoteTab and/or WordPad to see everything that was actually included in the physical e-mail item. If you don&#8217;t look at the details by yourself, you really can&#8217;t know what you are sending.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nutan</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/mmailsendmime/#comment-78496</link>
		<dc:creator>nutan</dc:creator>
		<pubDate>Thu, 24 Jun 2010 04:02:23 +0000</pubDate>
		<guid isPermaLink="false">#comment-78496</guid>
		<description><![CDATA[I pull all the error messages from the message queue, and put it in DB2 file. I want to send this DB2 file as an email attachment.]]></description>
		<content:encoded><![CDATA[<p>I pull all the error messages from the message queue, and put it in DB2 file. I want to send this DB2 file as an email attachment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/mmailsendmime/#comment-78495</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 24 Jun 2010 03:44:25 +0000</pubDate>
		<guid isPermaLink="false">#comment-78495</guid>
		<description><![CDATA[What kind of attachment are you sending? If we don&#039;t know what you are sending and what MIME type you have assigned, we can&#039;t provide any good answers.

Tom]]></description>
		<content:encoded><![CDATA[<p>What kind of attachment are you sending? If we don&#8217;t know what you are sending and what MIME type you have assigned, we can&#8217;t provide any good answers.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.035 seconds using memcached
Object Caching 295/301 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-19 00:27:27 -->