title: How do I get my old VBScript ASP sendemail to work on Azure?
body: <p>I recently migrated my ASP.Net website from a traditional windows 2003 shared server to Azure as a Web App. My VBScript forms which send e-mails to me have stopped working since the migration.  I have tried a few different approaches to get my VBScript email code to work but have had no luck so far.  Part of the problem is that I can't see what the error is. </p>
  
  <p>The first part of my question is: How do I make the ASP.Net errors on my VBScript ASP page visible?   I have set debug='true' in my web.config and I tried to set it on my ASP page (see below) but this hasn't worked.  Currently I just get an 'Internal error 500' page after attempting to send the email with no indication of what went wrong.  </p>
  
  <p>Here is the code that sends the e-mail and appears to be the source of the problem.  Can do I change this to work under Azure without rewriting my entire page in C#?</p>
  
  <pre><code>&lt;%@ Language=VBScript Debug='true' %&gt;  'Debug=true doesn't work
  
  Set Mailer = Server.CreateObject("Persits.MailSender")
  Mailer.Host = "mail.mydomain.com" ' Specify a valid SMTP server
  Mailer.From = Request.Form("AgentEmail") ' Specify sender's address
  Mailer.FromName = Request.Form("AgentsName") ' Specify sender's name
  Mailer.Port = 587
  Mailer.isHTML = True
  
  Mailer.AddAddress "person1@email.com"
  Mailer.AddAddress "person2@email.net"
  Mailer.AddAddress "person3@email.com"
  Mailer.AddAddress Request.Form("AgentEmail")
  Mailer.Body = "stuff in my email"
  
  
  Mailer.Username = "me@emailcom"
  Mailer.Password = "123456"
  On Error Resume Next
  Mailer.Send
  If Err &lt;&gt; 0 Then
     Response.Write "Error encountered: " &amp; Err.Description
  Else
     Response.Write "Success"
  End If
  </code></pre>
  
  <p>This code did work on my old Windows server.  I've left out all of the HTML since that part appears to work just fine.</p>