Email verification on free email accounts???
Email verification on free email accounts???
Can HB send email verification from an free email account such as Gmail, Hotmail, or Yahoo? I see that HB is looking for port 530. These free email acounts use ports 25 and 465. Is it possible to send email without 3rd party program such as Outlook, and Outlook Express, etc.?
Check the SMTP COM object by ostrosoft. Free to use for non-commercial stuff and works very well. Just drop it into a vbscript and it should do whatever you want. I haven't played with it in a while but was using it with Yahoo previously.
http://www.ostrosoft.com/smtp_component.asp
Osler
http://www.ostrosoft.com/smtp_component.asp
Osler
So there is no way around but to use a 3rd party program. I might just have to use Outlook or Outlook Express. All I am trying to do is send my home selected SMS messaged from my cell phone to my Home's Selected email. Execute the task then have my home reply back to my cell phone (SMS Message) since I have Unlimited Texting. LOL. Gotta keep those cost down. Also the scripts I have seen on the HB forum are not working for me, right off the bat. I am getting an "Error:0 "Object required: "Wscript" error. when i change the state of my script file to Running. I used the below script:
Set appOutl = WScript.CreateObject("Outlook.Application")
Set objSession = appOutl.GetNameSpace("MAPI")
objSession.Logon "Outlook"
' 3 = "Deleted Items"
' 4 = "Outbox"
' 5 = "Sent Items"
' 6 = "Inbox"
' 9 = "Calendar"
' 10 = "Contacts"
' 11 = "Journal"
' 12 = "Notes"
' 13 = "Tasks"
' 15 = "Reminders"
' 16 = "Drafts"
' *** INBOX folder
Set MyFolder = objSession.GetDefaultFolder(6)
Msgbox MyFolder.name & ", " & MyFolder.Items.Count
' Set MyItem to the collection of items in the folder.
Set myItems = myFolder.Items
' Loop through all of the items in the folder.
For I = 1 to MyFolder.Items.Count
MsgBox MyItems(I).subject
MsgBox MyItems(I).body
Next
' *** Contacts Folder
Set MyFolder = objSession.GetDefaultFolder(10)
Msgbox MyFolder.name & ", " & MyFolder.Items.Count
Set myItems = myFolder.Items.Restrict("[MessageClass] = 'IPM.Contact'")
For I = 1 to MyFolder.Items.Count
MsgBox MyItems(I).FullName
Next
Please remember I am new to scripting. I can figure it out but it will take a while. Is the above script written for Outlook Express or only Outlook?
Set appOutl = WScript.CreateObject("Outlook.Application")
Set objSession = appOutl.GetNameSpace("MAPI")
objSession.Logon "Outlook"
' 3 = "Deleted Items"
' 4 = "Outbox"
' 5 = "Sent Items"
' 6 = "Inbox"
' 9 = "Calendar"
' 10 = "Contacts"
' 11 = "Journal"
' 12 = "Notes"
' 13 = "Tasks"
' 15 = "Reminders"
' 16 = "Drafts"
' *** INBOX folder
Set MyFolder = objSession.GetDefaultFolder(6)
Msgbox MyFolder.name & ", " & MyFolder.Items.Count
' Set MyItem to the collection of items in the folder.
Set myItems = myFolder.Items
' Loop through all of the items in the folder.
For I = 1 to MyFolder.Items.Count
MsgBox MyItems(I).subject
MsgBox MyItems(I).body
Next
' *** Contacts Folder
Set MyFolder = objSession.GetDefaultFolder(10)
Msgbox MyFolder.name & ", " & MyFolder.Items.Count
Set myItems = myFolder.Items.Restrict("[MessageClass] = 'IPM.Contact'")
For I = 1 to MyFolder.Items.Count
MsgBox MyItems(I).FullName
Next
Please remember I am new to scripting. I can figure it out but it will take a while. Is the above script written for Outlook Express or only Outlook?
I also found this email retrieval from Outlook.
' ========================================================================
' script for e-mail subject check
' it will check the subject of unread emails in Outlook. If it has the right info
' in the subject it will take action and then delete e-mail.
' you must have outlook to automatically check email every xx minutes and then
' create a task to run this script every xx minutes.
' ========================================================================
Dim myOlApp
Dim intMessCount , intMyFoldersCount
Dim myFolder
Dim x
Dim UnRead
Dim objMessage
Dim objMessages
Dim objFolder
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder= myNameSpace.GetDefaultFolder(6)
UnRead=0
intMessCount = myFolder.Items.Count
SetPropertyValue "email.subject", ""
For x = 1 To intMessCount
myUnread = myFolder.Items(x).UnRead
If myUnread = True Then
'check for this title as the subject
If myFolder.Items(x) = "Disarm Security System" Then
SetPropertyValue "Security System Status.System Status", "Disarmed"
SetPropertyValue "email.subject", myFolder.Items(x)
myFolder.Items(x).Delete
UnRead = UnRead - 1
End If
UnRead = UnRead + 1
End If
Next
SetPropertyValue "email.UnRead", UnRead
' ========================================================================
' script for e-mail subject check
' it will check the subject of unread emails in Outlook. If it has the right info
' in the subject it will take action and then delete e-mail.
' you must have outlook to automatically check email every xx minutes and then
' create a task to run this script every xx minutes.
' ========================================================================
Dim myOlApp
Dim intMessCount , intMyFoldersCount
Dim myFolder
Dim x
Dim UnRead
Dim objMessage
Dim objMessages
Dim objFolder
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder= myNameSpace.GetDefaultFolder(6)
UnRead=0
intMessCount = myFolder.Items.Count
SetPropertyValue "email.subject", ""
For x = 1 To intMessCount
myUnread = myFolder.Items(x).UnRead
If myUnread = True Then
'check for this title as the subject
If myFolder.Items(x) = "Disarm Security System" Then
SetPropertyValue "Security System Status.System Status", "Disarmed"
SetPropertyValue "email.subject", myFolder.Items(x)
myFolder.Items(x).Delete
UnRead = UnRead - 1
End If
UnRead = UnRead + 1
End If
Next
SetPropertyValue "email.UnRead", UnRead
There is no WScript object in HouseBot. Try just using:
Osler
Code: Select all
Set x = CreateObject("Outlook.Application")
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
I just went through a complete ostrosoft pop3 script install with Steve. It provides a fully integrated email option with HouseBot. Right now it receives and deletes mail upon request, but with the correct scripting additions you can send messages as well.
Not sure what you want to do, but couldn't you just get the text out of your mail and forard it using the built in email device?
Olser is right about the WScript. Just leave that away and it should work.
Not sure what you want to do, but couldn't you just get the text out of your mail and forard it using the built in email device?
Olser is right about the WScript. Just leave that away and it should work.
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
James,
Steve has it all and I don't have the time right now because these things take up lots of emails and amongst other things, my system is going down to get the hardware replaced. Maybe Steve is willing to help you on this one. Otherwise you have to wait until after the beginning of april.
Good luck.
Steve has it all and I don't have the time right now because these things take up lots of emails and amongst other things, my system is going down to get the hardware replaced. Maybe Steve is willing to help you on this one. Otherwise you have to wait until after the beginning of april.
Good luck.
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
Richard did all the work. He sent me his email app's pieces, I made very minor changes (mostly to removes some of the Dutch in the message strings), and make it a little more generic - less tied to his HB theme. I can send you his original zip file, or the result of what little I put into it. I made no changes to the POP portion - that's all turnkey. I went thru several iterations getting it to install and work, mostly due to my blunders. But its functioning now in its more generic form.
Steve
You can try this for outgoing messages. Hotmail only uses HTTP and Google uses SSL encryption so I'm pretty sure Yahoo is going to be your best bet. I haven't tested the script below as I have firewall issues at work, but it should function correctly. I can walk you through any difficulties as needed.
Modified from Ostrosoft sample vbscript:
Osler
Modified from Ostrosoft sample vbscript:
Code: Select all
'VBScript sample for OstroSoft SMTP Component
'written by Igor Ostrovsky (OstroSoft)
'
'Permanent URL for this project is
'http://www.ostrosoft.com/smtp_component/smtp_vbscript.asp
'
'For more information about OstroSoft SMTP Component go to
'http://www.ostrosoft.com/smtp_component.asp
'
'OstroSoft SMTP Component is available for download at
'http://www.ostrosoft.com/download/smtp_component.zip
'
'Questions, suggestions, comments - email to [email protected]
'or submit a form at http://www.ostrosoft.com/contact.asp
Option Explicit
Dim oSMTP 'As OSSMTP.SMTPSession
Set oSMTP = CreateObject("OSSMTP.SMTPSession")
oSMTP.Server = "smtp.mail.yahoo.com" 'SMTP server name or IP address
oSMTP.Port = 25
oSMTP.MailFrom = "[email protected]" 'sender e-mail address
oSMTP.SendTo = "[email protected]" 'recipient e-mail address
oSMTP.AuthenticationType = 2 '0 = AuthNone, 1 = AuthPOP, 2 = AuthLogin, 3 = AuthPlain
oSMTP.Username = "my name" 'name for mailserver authentication
oSMTP.Password= "my password" 'password for mailserver authentication
oSMTP.MessageSubject = "test message" 'message subject or use GetPropertyValue(".MySubject") to retrieve a property from HB
oSMTP.MessageText = "this is a test" 'message text or use GetPropertyValue(".MyText") to retrieve a property from HB
oSMTP.RaiseError = True
oSMTP.SendEmail
Set oSMTP = Nothing
That script worked great..... Thank everyone for all your help. We have now overcomed the sending of email, now a new question is; will this script worked for pop (incoming) email. I mean basic email send from a cell-phone. Not the long emails you get from your mother, father, wife, or etc. Basic email that says in the subject "Basement Light On," and trigger HB to proform a task.
-
- HouseBot Guru
- Posts: 757
- Joined: Wed Apr 02, 2003 8:10 pm
- Location: Pelham AL
I'm certainly not the expert on this, or much else. But I don't see why Richard's email check&show process could not be modified to work. Since it captures the subject line when the VBScript executes the SHOW_EMAIL sub, you could develop a standard. HB preamble, like "HB: Turn basement light on" that could be ID'd by the Email VBscript to set a property in the EMAIL "device". But what do I know....
Steve