Hello Guest it is March 28, 2024, 08:07:15 AM

Author Topic: Text Message  (Read 3449 times)

0 Members and 1 Guest are viewing this topic.

Text Message
« on: March 14, 2011, 08:15:53 PM »
Anyone ever write a VB script to send a text message to a phone via the internet?

Dan

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Text Message
« Reply #1 on: March 14, 2011, 09:52:19 PM »
YES, I will have to look it up and post it later. It works very well to keep you up to date on long runs

(;-) TP


OK HERE YOU GO, Your machine can call home. You wil have to fill in the account info stuff to math your settings and password.


'M3030 Macro

Message " MACHINE #549, Process COMPLETED Call Home"

 
Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).

Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Machine Alert"
objMessage.From = """Machine #549"" <Machine#549@BR549.com>"
objMessage.To = "YOUR EMAIL ADDRESS.com"
objMessage.TextBody = "Machine #549 Process Completed.." & vbCRLF & "Thank You(;-)"

'==This section provides the configuration information for the remote SMTP server.

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "YOUR SMTP SERVER NAME"

'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic

'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "YOU ACCOUNT NAME ON THE SERVER"

'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "YOU ACCOUNT PASSWORD"

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False

'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

objMessage.Configuration.Fields.Update

'==End remote SMTP server configuration section==

objMessage.Send
End
« Last Edit: March 14, 2011, 10:03:21 PM by BR549 »
Re: Text Message
« Reply #2 on: March 14, 2011, 10:14:10 PM »
Thanks!
Re: Text Message
« Reply #3 on: March 15, 2011, 09:58:21 AM »
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Machine Alert"
objMessage.From = """Machine #549"" <Machine#549@BR549.com>"            <-------------------------------- I am assuming here you put your email address
objMessage.To = "YOUR EMAIL ADDRESS.com"                              <------- and here you put your phone number? *********@vtext.com
objMessage.TextBody = "Machine #549 Process Completed.." & vbCRLF & "Thank You(;-)"
« Last Edit: March 15, 2011, 10:00:03 AM by dfurlano »
Re: Text Message
« Reply #4 on: March 15, 2011, 11:31:00 AM »
BTW:

The above does work with a Verizon cell phone *********@vtext.com

The standard port has now changed from port 25 to 587

Thanks again.

Dan