<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBScript: автоматическая отправка письма]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=8&amp;type=atom" />
	<updated>2008-01-24T19:34:23Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8</id>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: автоматическая отправка письма]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=8293#p8293" />
			<content type="html"><![CDATA[<p>Вставка картинки в тело письма:<br /></p><div class="codebox"><pre><code>Set Message = CreateObject(&quot;CDO.Message&quot;) 
Message.To = &quot;to@bk.ru&quot;
Message.From = &quot;from@bk.ru&quot;
Message.Subject = &quot;Тема&quot;
Message.BodyPart.Charset = &quot;windows-1251&quot;
Message.AddRelatedBodyPart &quot;C:\Windows\Web\WallPaper\Windows XP.jpg&quot;, &quot;pic&quot;, 1
Message.htmlbody = &quot;&lt;HTML&gt;Текст сообщения&lt;BR&gt;&lt;img src=&quot;&quot;pic&quot;&quot;&gt;&lt;/HTML&gt;&quot;

Set iConf = CreateObject(&quot;CDO.Configuration&quot;)
Set Flds = iConf.Fields
Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/sendusing&quot;) = 2
Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/smtpserver&quot;) = &quot;smtp.bk.ru&quot;
Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout&quot;) = 10
Flds.Update
Message.Configuration = iConf

Message.Send</code></pre></div><p>Благодарность за идею - <strong>Xameleon</strong>.</p>]]></content>
			<author>
				<name><![CDATA[The gray Cardinal]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2</uri>
			</author>
			<updated>2008-01-24T19:34:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=8293#p8293</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBScript: автоматическая отправка письма]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=18#p18" />
			<content type="html"><![CDATA[<p>Отправка письма с вложением с помощью библиотеки CDO (библиотека входит в поставку MS Outlook и устанавливается из дистрибутива MS Outlook - компонент &quot;Collaboration Data Objects&quot; или &quot;Объекты для совместной работы&quot;). На сервере вполне возможна установка <strong>только</strong> этого компонента MS Office.<br /></p><div class="codebox"><pre><code>Call SendPost(&quot;smtp.mail.ru&quot;, &quot;to@mail.ru&quot;, &quot;from@mail.ru&quot;, &quot;Subj&quot;, &quot;Body&quot;)
Function SendPost(strSMTP_Server, strTo, strFrom, strSubject, strBody)
    Set iMsg = CreateObject(&quot;CDO.Message&quot;)
    Set iConf = CreateObject(&quot;CDO.Configuration&quot;)
    Set Flds = iConf.Fields
    Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/sendusing&quot;) = 2
    Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/smtpserver&quot;) = strSMTP_Server
    Flds.Item(&quot;http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout&quot;) = 10
    Flds.Update
    iMsg.Configuration = iConf
    iMsg.To = strTo
    iMsg.From = strFrom
    iMsg.Subject = strSubject
    iMsg.TextBody = strBody
    iMsg.AddAttachment &quot;C:\boot.ini&quot;
    iMsg.Send
End Function</code></pre></div>]]></content>
			<author>
				<name><![CDATA[The gray Cardinal]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2</uri>
			</author>
			<updated>2006-07-07T15:14:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=18#p18</id>
		</entry>
</feed>
