<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBS: Отправка письма с вложениями]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=10599</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10599&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBS: Отправка письма с вложениями».]]></description>
		<lastBuildDate>Mon, 27 Apr 2015 09:57:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBS: Отправка письма с вложениями]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=93637#p93637</link>
			<description><![CDATA[<p>Данный скрипт просто открывает в IE страницу на gmail с твоей почтой, находит элементы на странице по их именам, вставляет в них текст и нажимает кнопку Отправить. Но стоит веб-мастерам gmail хоть чуть-чуть поправить код (а они его правят регулярно) и этот скрипт потеряет работоспособность. А вложение тут цепляется через &lt;input type=&quot;file&quot;&gt; в который автоматом имя нужного файла не вставишь (безопасность, мать ее...)...<br />Короче, у меня такое предложение - забить на этот скрипт и пользоваться <a href="http://forum.script-coding.com/viewtopic.php?id=7232">нормальными решениями</a>.</p>]]></description>
			<author><![CDATA[null@example.com (mozers)]]></author>
			<pubDate>Mon, 27 Apr 2015 09:57:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=93637#p93637</guid>
		</item>
		<item>
			<title><![CDATA[VBS: Отправка письма с вложениями]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=93592#p93592</link>
			<description><![CDATA[<p>Есть вот такой скрипт создания письма. Подскажите, как к письму прикрепить файлы.<br /><a href="http://www.webdeveloper.com/forum/showthread.php?300543-How-does-gmail-attach-file-work">ссылка </a>вроде по теме<br /></p><div class="codebox"><pre><code>WScript.Quit Main

Function Main
  Set objShell = WScript.CreateObject(&quot;WScript.Shell&quot;)
  Set IE = WScript.CreateObject(&quot;InternetExplorer.Application&quot;, &quot;IE_&quot;)
  IE.Visible = True
  objShell.AppActivate IE
  Resolution = Screen_Resolution()
  Width =  Resolution(0)
  Hight=  Resolution(1)
  IE.Top = 0
  IE.Left = 300
  IE.Width = 1000
  IE.Height = 1170
  IE.Visible = 1
  IE.AddressBar = 0
  IE.Navigate &quot;https://mail.google.com/mail/u/0/?view=cm&amp;fs=1&quot;
&#039;&amp;to=someone@example.com&amp;su=МАКЕТ&amp;body=BODY LINE1%0aBODY LINE2&amp;bcc=someone.else@example.com&amp;tf=1
  Wait IE
  With IE.Document
    .getElementByID(&quot;:om&quot;).value = &quot;&quot; &#039;Кому
    .getElementByID(&quot;:p1&quot;).value = &quot;&quot; &#039;ТЕМА
    &#039;.getElementByID(&quot;gaia_loginform&quot;).submit
&#039;    .getElementsByClassName(&quot;a1 aaA aMZ&quot;).value = &quot;D:\data.txt&quot;
&#039;    .getElementById(&quot;:oi&quot;).value = &quot;D:\data.txt&quot;
&#039;    .getElementsByClassName(&quot;a1 aaA aMZ&quot;)(0).submit()


  End With
End Function

Sub Wait(IE)
  Do
    WScript.Sleep 500
  Loop While IE.ReadyState &lt; 4 And IE.Busy
  Do
    WScript.Sleep 500
  Loop While IE.ReadyState &lt; 4 And IE.Busy
End Sub

Sub IE_OnQuit
  On Error Resume Next
  WScript.StdErr.WriteLine &quot;IE closed before script finished.&quot;
  WScript.Quit
End Sub

Function Screen_Resolution()
Dim MyArray(1)
    Set objWMIService = GetObject(&quot;Winmgmts:\\.\root\cimv2&quot;)
    Set colItems = objWMIService.ExecQuery(&quot;Select * From Win32_DesktopMonitor where DeviceID = &#039;DesktopMonitor1&#039;&quot;,,0)
    For Each objItem in colItems
        intHorizontal = objItem.ScreenWidth
        intVertical = objItem.ScreenHeight
    Next
MyArray(0) = intHorizontal
MyArray(1) = intVertical
Screen_Resolution = MyArray

End Function</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (929151)]]></author>
			<pubDate>Sat, 25 Apr 2015 04:01:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=93592#p93592</guid>
		</item>
	</channel>
</rss>
