![]() |
Automatically click on links in incoming mails
Hi,
imagine this scenario: I use a server based script to submit picture galleries to another server. This happens some times a day. Now this server server sends an e-mail to me, asking me to confirm, that it really was me, who submitted these galleries. In that e-mail there is an url that I need to click on. Something like: http://www.example.com/confirm.x3ml?...ssionid-blabla Currently I have to click this link manually every time, and that's not as automated as I'd like to have. I experimented a little bit with VBA in my Outlook client, but it didn't seem to do anything at all. I think I tried to implement Application_NewMail. Had to reinstall my computer though and forgot to make a backup of my function ;) Is there a simple solution to my problem? Tks, Dominik |
Automatically click on links in incoming mails
Hi again,
found an answer myself: Private Declare Function URLDownloadToFile Lib "urlmon.dll" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Public Function DownloadFile(URL As String, LocalFileName As String) As Boolean Dim lngRetVal As Long lngRetVal = URLDownloadToFile(0, URL, LocalFileName, 0, 0) DownloadFile = (lngRetVal = 0) End Function Sub ClickX3ScriptsLink(MyMail As MailItem) Dim x x = InStr(MyMail.Body, "http://www.x3scripts.com/tgp/confirm.x3ml?") If x 0 Then URL$ = Mid(MyMail.Body, x) x = InStr(URL$, Chr$(13)) URL$ = Trim(Left(URL$, x - 1)) DownloadFile URL$, Environ("TEMP") & "\x3.tmp" MyMail.Body = MyMail.Body & Chr(13) & Chr(13) & "done" End If End Sub And then call "ClickX3ScriptsLink" by a rule. |
All times are GMT +1. The time now is 11:23 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com