[Web4lib] mailto links and email client
Gary Oliver
oliverg at newpaltz.edu
Wed Nov 15 12:58:30 EST 2006
I have wanted an email client for our public PCs that can handle
responding to mail to links without needing to have a user name set up
ahead of time. I know the smtp server etc. but I want it to ask for both
Username and Password when responding to email link. I do not want it to
force them to set up a profile though because I want to set the server etc.
Does anyone know how to do this?
I set up a XP VB Script that captures the email address puts it on the
windows clipboard and gives the user a message to paste it in when they
logon to webmail. It pretends to be the default mail client with a .reg
file. But even that leave users confused.
Code for those below win XP pro tested only
NOTE: Extra line breaks from this email system may need to be removed.
Mailclient.vbs code__________________________
'on error resume next
Set objArgs = WScript.Arguments
Dim counter, myNum
counter = 0
myNum = 0
For I = 0 to objArgs.Count - 1
myNum = myNum - 1
counter = counter + 1
Next
DIM email
email = Lcase(objArgs(0))
email = replace(email, "mailto:", "")
strCopy = email
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("about:blank")
objIE.document.parentwindow.clipboardData.SetData "text", strCopy
objIE.Quit
theMessage = " "_
& vbCrLf & Email _
& vbCrLf & " The email address you clicked on has been copied to
the clipboard."_
& vbCrLf & "Open any web mail service Like NP mail then "_
& vbCrLf & "Put your cursor in the TO: address box and press CTRL+V to
paste it in. "_
& vbCrLf
Set WshShell = WScript.CreateObject("WScript.Shell")
DIM MyVar
MyVar = MsgBox (theMessage, 0, " Email Address Captured")
Mailsetup.reg code___________________________________
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\mailto\shell\open\command]
@="wscript.exe c:\\batch\\mailclient.vbs \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Contacts\Address
Book\Protocols\certificate_wab_auto_file\shell\open\command]
@="\"wscript.exe c:\\batch\\mailclient.vbs\""
[HKEY_CLASSES_ROOT\mailto\shell\open\command]
@="wscript.exe c:\\batch\\mailclient.vbs \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Contacts\Address
Book\Protocols\ldap\shell\open\command]
@="\"wscript.exe c:\\batch\\mailclient.vbs\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Contacts\Address
Book\Protocols\vcard_wab_auto_file\shell\open\command]
@="\"wscript.exe c:\\batch\\mailclient.vbs\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Contacts\Address
Book\shell\open\command]
@="\"wscript.exe c:\\batch\\mailclient.vbs\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Internet Call\Microsoft
NetMeeting\Protocols\callto\shell\open\command]
@="\"wscript.exe c:\\batch\\mailclient.vbs\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Internet Call\Microsoft
NetMeeting\shell\open\command]
@="\"wscript.exe c:\\batch\\mailclient.vbs\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail]
@="Patron"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Patron]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Patron\protocols]
"New Value #1"=hex(2):00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Patron\protocols\mailto]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Patron\protocols\mailto\DefaultIcon]
@="c:\\windows\\mail.ico"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Patron\protocols\mailto\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Patron\protocols\mailto\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Patron\protocols\mailto\shell\open\command]
@="\"wscript.exe c:\\batch\\mailclient.vbs %1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Patron\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Patron\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Patron\shell\open\command]
@="\"wscript.exe c:\\batch\\mailclient.vbs\""
More information about the Web4lib
mailing list