Jump to content

IpSend


Recommended Posts

If someone can use this script :( or can translate it in au3 :(

Dim WSHShell

Set WSHShell = WScript.CreateObject("WScript.Shell")

const URL = "http://xml.showmyip.com/"

set xmldoc = CreateObject("Microsoft.XMLDOM")

xmldoc.async=false

xmldoc.load(URL)

for each x in xmldoc.documentElement.childNodes

if x.NodeName = "ip" then

Ip = x.text

end if

next

Set objMessage = CreateObject("CDO.Message")

objMessage.Sender = "nobody@nobody.com"

objMessage.To = "nobody@nobody.com"

objMessage.TextBody = Ip

objMessage.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

objMessage.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.nobody.com"

objMessage.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

objMessage.Configuration.Fields.Update

objMessage.Send

Sapiente vince, rex, noli vincere ferro!

Link to comment
Share on other sites

If someone can use this script  :( or can translate it in au3  :(

I realy like this script. I learned how to parse XML documents and how to send e-mail via a COM object. Realy nice. Thanks!

Here is the code in AutoIT.

$URL = "http://xml.showmyip.com/"


$xmldoc = ObjCreate("Microsoft.XMLDOM")
$xmldoc.async=false
$xmldoc.load($URL)
for $x in $xmldoc.documentElement.childNodes
    if $x.NodeName = "ip" then
      $ip = $x.text
    endif
next

msgbox(4096,"", "My IP: " & $ip)

$objMessage = ObjCreate("CDO.Message")
;$objMessage.Sender = "nobody@nobody.com"; <== Sender seems to be wrong. Better use .From (next line)
$objMessage.From = "nobody@nobody.com"
$objMessage.To = "nobody@nobody.com"
$objMessage.Subject = "INFO: IP address"
$objMessage.TextBody = "Your IP: " & $ip 
$objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
$objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.nobody.com"
$objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
$objMessage.Configuration.Fields.Update
$objMessage.Send

msgbox(4096,"", "Message was sent. Check your Inbox")

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

  • 2 weeks later...

Because is a little bit the same script i post it here...

Set objMessage = CreateObject("CDO.Message")

objMessage.Subject="Test"

objMessage.From="nobody@nobody.com"

objMessage.To="nobody@nobody.com"

objMessage.CreateMHTMLBody "file://c:/test.htm"

objMessage.Send

or

Set objMessage = CreateObject("CDO.Message")

objMessage.Subject = "Test"

objMessage.Sender = "nobody@nobody.com"

objMessage.To = "nobody@nobody.com"

objMessage.TextBody = "Test"

objMessage.AddAttachment "c:\test.htm"

objMessage.Send

Is these,

objMessage.CreateMHTMLBody "file://c:/test.htm"

and these,

objMessage.AddAttachment "c:\test.htm"

possible with autoit?

Sapiente vince, rex, noli vincere ferro!

Link to comment
Share on other sites

Is these, .... possible with autoit?

Just try it and you will see .... I gave you the code to start with.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

No it don't work :(

He give this error:

C:\Documents and Settings\Yves\Mijn documenten\Test.au3 (20) : ==> The requested action with this object has failed.:

$objMessage.AddAttachment = "c:\test.htm"

$objMessage.AddAttachment = "c:\test.htm"^ ERROR

Sapiente vince, rex, noli vincere ferro!

Link to comment
Share on other sites

$objMessage.AddAttachment = "c:\test.htm"

Try this.

$objMessage.AddAttachment("c:\test.htm")

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...