• nicowens
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hello.  I'm trying to submit a lead via Web2Lead - but programatically.  Below is the essence of the code.  It isn't working.  I don't see any errors, but no lead is created and I don't get the resulting email.  If I create an HTML form and try it, it works perfectly.

I'm doing this programatically because I want to do multiple things with the info.  Send some emails, create a Lead, etc...

Thanks for your time.
Chris

Set objHttp = Server.CreateObject("Microsoft.XMLHTTP")
objHttp.Open "POST", "http://www.salesforce.com/servlet/servlet.WebToLead", False

QS = "debug=0"
QS = QS & "&encoding=UTF-8"
QS = QS & "&oid=my oid here"
QS = QS & "&debugEmail=my email addr here"
QS = QS & "&first_name=TEST"
QS = QS & "&last_name=TEST"
 

objHttp.Send QS
strResult = objHttp.responseText
Set objHttp = Nothing
 
response.write("[" & QS & "]<br>")
response.write("[" & strResult & "]<br>")
response.end