title: Classic ASP Mail - Error send to user and admin
body: <p>I am sending a mail using CDO.Message. When the user submits a form, the form details to be sent to the Web Site Owner and a Acknowledgement mail to the user. The later is not working for me. I have repeated the same code twice by changing the configuration names, I simply get "Internal Server Error"</p>
  
  <p>My Code (mail to the Web Site Owner)</p>
  
  <pre><code>&lt;%
  name = Request.Form ("name")
  email = Request.Form ("email")
  phone = Request.Form ("phone")
  message = Request.Form ("message")
  
  Dim iMsg, iConf, Flds, vSub
  
  Response.CodePage = 65001
  Response.CharSet = "utf-8"
  
  Set iMsg = CreateObject("CDO.Message")
  Set iConf = CreateObject("CDO.Configuration")
  Set Flds = iConf.Fields
  
  'sending email with Google Apps Premium SMTP server (with autentication)
  schema = "http://schemas.microsoft.com/cdo/configuration/"
  Flds.Item(schema &amp; "sendusing") = 2
  Flds.Item(schema &amp; "smtpauthenticate") = 1
  Flds.Item(schema &amp; "smtpserver") = "localhost"
  Flds.Item(schema &amp; "smtpserverport") = 25
  Flds.Item(schema &amp; "sendusername") = "info@priceakagri.ru"
  Flds.Item(schema &amp; "sendpassword") = "******"
  Flds.Update
  
  With iMsg
  Set .Configuration = iConf
  .BodyPart.Charset = "utf-8"
  .To = "info@akagri.ru"
  .From = "info@priceakagri.ru"
  .Subject="Message from Priceakagri.ru contact page"
  
  .HTMLBody="Здравствуйте! &lt;br&gt;&lt;br&gt;You have received an Enquiry from &lt;font color='#337AB7'&gt;&lt;b&gt;" &amp; Trim(Request("name")) &amp; "&lt;/b&gt;&lt;/font&gt;.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;table&gt;&lt;tr&gt;&lt;td width='30%' colspan='2' bgcolor='#337AB7'&gt;Message Details&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;" &amp; Trim(Request("name")) &amp; "&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Email&lt;/td&gt;&lt;td&gt;" &amp; Trim(Request("email")) &amp; "&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Phone&lt;/td&gt;&lt;td&gt;" &amp; Trim(Request("phone")) &amp; "&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Message&lt;/td&gt;&lt;td&gt;" &amp; Trim(Request("message")) &amp; "&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"
  Set .Configuration = iConf
  .Send
  End With
  set iMsg = nothing
  set iConf = nothing
  set Flds = nothing
  %&gt;
  </code></pre>
  
  <p>The above code works perfectly for me. If I replicate the same and send user a mail on acknowledgement, I get error. I used the users email as .To and From as - info@priceakagri.ru</p>
  
  <p>I have done this in my earlier sites, where I include a .txt file for the later and still is working for me.</p>
  
  <p>Need help. </p>
  
  <p>Regards,
  Badri</p>