<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBS: Путь к %windir% при отправке файла на e-mail]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=5263</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5263&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBS: Путь к %windir% при отправке файла на e-mail».]]></description>
		<lastBuildDate>Wed, 08 Dec 2010 17:31:56 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBS: Путь к %windir% при отправке файла на e-mail]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=42716#p42716</link>
			<description><![CDATA[<p>Спасибо огромное <strong>armenxxx1</strong>! Код работает!!! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Спасибо <strong>alexii</strong> за ссылку(буду изучать),замечание - учту!</p>]]></description>
			<author><![CDATA[null@example.com (КИРПИЧ)]]></author>
			<pubDate>Wed, 08 Dec 2010 17:31:56 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=42716#p42716</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Путь к %windir% при отправке файла на e-mail]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=42715#p42715</link>
			<description><![CDATA[<p><span style="color: Green"><strong>КИРПИЧ</strong>, код на форуме оформляется <a href="http://forum.script-coding.com/help.php#bbcode">тэгом «code»</a>.</span></p><p>Смотрите, например, здесь: <a href="http://www.script-coding.com/WSH/WshShell.html#3.1.">3.1. ExpandEnvironmentStrings</a>.</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Wed, 08 Dec 2010 17:11:52 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=42715#p42715</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: Путь к %windir% при отправке файла на e-mail]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=42714#p42714</link>
			<description><![CDATA[<div class="codebox"><pre><code>Set WSHShell = WScript.CreateObject(&quot;WScript.Shell&quot;)
Const str = &quot;http://schemas.microsoft.com/cdo/configuration/&quot;
With WScript.CreateObject(&quot;CDO.Message&quot;)
.From = &quot;xxx@mail.ru&quot;
.To = &quot;xxx@mail.ru&quot;
.Subject = &quot;xxx&quot;
.Textbody = &quot;xxxxx&quot;
.AddAttachment WSHShell.ExpandEnvironmentStrings(&quot;%windir%\TEST.txt &quot;)
With .Configuration.Fields
.Item(str &amp; &quot;smtpserver&quot;) = &quot;smtp.mail.ru&quot;
.Item(str &amp; &quot;sendusing&quot;) = 2
.Item(str &amp; &quot;smtpserverport&quot;) = 2525
.Item(str &amp; &quot;smtpauthenticate&quot;) = 1
.Item(str &amp; &quot;sendusername&quot;) = &quot;xxx@mail.ru&quot;
.Item(str &amp; &quot;sendpassword&quot;) = &quot;pss&quot; 
.Update
End With  
.Send
End With</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (armenxxx1)]]></author>
			<pubDate>Wed, 08 Dec 2010 17:09:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=42714#p42714</guid>
		</item>
		<item>
			<title><![CDATA[VBS: Путь к %windir% при отправке файла на e-mail]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=42713#p42713</link>
			<description><![CDATA[<p>Доброго времени суток! Есть скрипт отправки файла на e-mail. При прописывании пути: iMsg.AddAttachment &quot; C:\WINDOWS\TEST.TXT&quot; - файл отсылается. Хотелось-бы прописать:iMsg.AddAttachment &quot;&nbsp; <strong>%windir%</strong>\TEST.txt </p><p>Код:</p><p>set FSO = CreateObject(&quot;Scripting.FileSystemObject&quot;) <br />Set WSHshell = WScript.CreateObject(&quot;WScript.Shell&quot;) <br />Set sDir = WSHshell.Environment(&quot;Process&quot;) &#039; - находим путь к папке Windows<br />&#039;=================================================&nbsp; &nbsp; ==================================================&nbsp; &nbsp; ============<br />set FSO=createobject(&quot;scripting.filesystemobject&quot;)<br />Call SendPost(&quot;smtp.mail.ru&quot;,&quot;*********77@mail.ru&quot;,&quot;**********ez@mail.ru&quot;,&quot;Инфо&quot;,&quot;**********&quot;)<br />Function SendPost(strSMTP_Server,strTo,strFrom,strSubject,strBody)<br />Set iMsg=CreateObject(&quot;CDO.Message&quot;)<br />Set iConf=CreateObject(&quot;CDO.Configuration&quot;)<br />Set Flds=iConf.Fields<br />Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/sendusing&quot;)=2<br />Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/smtpauthenticate&quot;)=1<br />Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/sendusername&quot;)=&quot;*********ez@mail.ru&quot;<br />Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/sendpassword&quot;)=&quot;*********&quot;<br />Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/smtpserver&quot;)=&quot;smtp.mail.ru&quot;<br />Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/smtpserverport&quot;)=25<br />Flds.Update<br />iMsg.Configuration=iConf<br />iMsg.To=strTo<br />iMsg.From=strFrom<br />iMsg.Subject=strSubject<br />iMsg.TextBody=strBody<br />iMsg.AddAttachment &quot; &quot;windir&quot;\TEST.TXT&quot;<br />iMsg.Send<br />End Function<br />Set iMsg=Nothing<br />Set iConf=Nothing<br />Set Flds=Nothing</p><p>Происходит ошибка:<br />Строка: 24<br />Символ: 23<br />Ошибка: Предполагается наличие окончания инструкций<br />код: 80A0401</p><p>P.S. Гуглил,читал, экспериментировал - но победить не смог(в языках программирования полный ноль)</p>]]></description>
			<author><![CDATA[null@example.com (КИРПИЧ)]]></author>
			<pubDate>Wed, 08 Dec 2010 16:48:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=42713#p42713</guid>
		</item>
	</channel>
</rss>
