Nothing fancy here... the code certainly isn't anything to marvel at. The truth is that I wasn't really finished with the program when it successfully sent me a text message in the middle of the night - letting me know that BestBuy had the item in stock. So, I'd consider this a very rough 'work in progress'.
It is a threaded application, although I'd really have been better off with a simple background worker than managing my own thread. But like I said, I had bigger plans for this guy. It uses the WebClient to visit a website and determine whether or not the product is in stock or not. When it is 'In Stock' the program sends an e-mail and a text message to my cell phone (using the Outlook interop).
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
| 'Use Outlook to send an e-mail
Dim OLApp As New Microsoft.Office.Interop.Outlook.Application
Dim msg As Microsoft.Office.Interop.Outlook.MailItem
'Create a new Mail item
msg = OLApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem)
'Adding recipeints
msg.Recipients.Add("[email protected]")
msg.Recipients.Add("[email protected] ")
'Add Subject / body
msg.Subject = "WII!"
msg.Body = "WII AT BESTBUY.COM!!!!"
'Send message
msg.Send()
|
Pretty straight-forward really. The source-code is available below.