ASP

From Rackspace Email & Apps API
Jump to: navigation, search

A customer recommended the following article as being helpful for System.Net.WebException errors: http://geekswithblogs.net/Denis/archive/2005/08/16/50365.aspx

<%
Option Explicit

Dim soapClient
set soapclient = CreateObject("MSSOAP.SoapClient")

soapclient.ClientProperty("ServerHTTPRequest") = True
soapclient.mssoapinit "https://admin.webmail.us/excedentsoap/excedentsoap.wsdl",
"excedentsoap", "UtilsSoapPort"

'*********************Initializing*************************
Dim retval

'this is the username and password you use to log in to our admin.webmail.us site
Dim AdminUsername, AdminPassword

AdminUsername = "adminUser"
AdminPassword = "adminPassword"

Dim emailAddr
Dim HostName 'the hostname of the email domain
Dim UserID 'userid (id before the @ symbol in the email address)
Dim sesID

HostName = "webmail.us"
UserID = "someguy"

'*************function call checkuserexists****************
retval = soapclient.LoginUserWebMail(AdminUsername, AdminPassword, HostName, UserID, sesID)

Response.Write retval
Response.Write "
" & sesID
Response.Redirect "http://reseller1.webmail.us/mail/src/redirect.php?
  user_name=someguy@webmail.us&emailaddress=someguy@webmail.us&sessionID="&SesID

Set soapclient = nothing

%>