Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - SendMail problem using CDONTS
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SendMail problem using CDONTS

 Post Reply Post Reply
Author
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Topic: SendMail problem using CDONTS
    Posted: 25 March 2003 at 3:41am

In the script below i am using a drop-down box to select the e-mailadress the e-mail has to be send to. the problem is that i can not send an e-mail with it. and i have to send an e-mail with this small script.

Greetings Chris

----------------------------------------------

<html>
<head>
<title>CDONTS Test</title>
</head>
<body bgcolor="#ffffff">
<center>
<table width="500">

<%
If request.form("action")="Verstuur" then
    on error resume next
    Set Mail = CreateObject("CDONTS.Newmail")
    if err.number = 0 then
        Mail.From = "Gravenrode Website"
        Mail.To = request.form("Locatie.Selected")
        Mail.Subject = "Ziekmelding"
        Mail.Body = "CDO for NT is available on your server " & request.form("Naam")
        Mail.Send
        Set Mail = Nothing
%>
<tr>
  <td align="center">
  <b>Test Completed</b>
  <p>Your email should arrive shortly
  <% else %>
  <td align="center">
  <font face="arial">
  <h3>Test Completed</h3>
  <p>Your webserver does not support CDONTS.
  <% end if %>
  </td>
</tr>

<% Else %>
<tr>
  <td align="center">
    <font face="times new roman">
    <h2 align="center"><i>CDO for NT Test</i></h2></font>
    <font face="Arial">
    <form action="cdotest.asp" method="POST">
    <p align="center">If your server supports CDO for NTS you will receive e-mail
    <br>confirmation within a few minutes of submitting the form.
    <div align="center">
      <center><pre>De naam van uw kind: <input type="text" name="Naam" size="20">  
      De locatie van uw kind:<select name="Locatie" size="1" width="25">
<option selected>Selecteer de locatie van uw kind</option>
<option value="c.simon@gravenrode.nl">Locatie Achter de Winkel</option>
<option value="c.simon@gravenrode.nl">Locatie De Wendel</option> </select>
    </pre>
      </center>
    </div>
    <p align="center"><center><input type="SUBMIT" name="action" value="Verstuur">
    <input type="RESET" value="Wissen"></center></form></font>
    </td>
<% End If %>
</table>
</body>
</html>

Using forum at Gravenrode and here and here
Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 25 March 2003 at 7:51am

found the solution.
the line
          Mail.From = "Gravenrode Website"
has to be
          Mail.From = "Gravenrode Website<gravenrode@gravenrode.nl>"
and the line
          Mail.To = request.form("Locatie.Selected")
has to be
          Mail.To = request.form("Locatie")

please notice that this is my first asp page i ever build my self

greetings Chris



Edited by eagle00789
Using forum at Gravenrode and here and here
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.