Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 3rd, 2007, 11:19 AM
Authorized User
 
Join Date: Dec 2006
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default send e-mail form but..

I can't see what I'm doing wrong. I don't get any errors. :(

IF request.ServerVariables("REQUEST_METHOD")="POST" THEN
    sqlString = "INSERT INTO aanpassingenPrio " &_
     "( prioriteit, stat, opleverdatum, aanpassing, " &_
     "commentaar, toevoeger, opleverdatumDD, opleverdatumMM, opleverdatumJJJJ ) VALUES ( " &_
     tosql(prioriteit) & "," &_
     tosql(stat) & "," &_
     tosql(opleverdatum) & "," &_
     tosql(aanpassing) & "," &_
     tosql(commentaar) & "," &_
     tosql(toevoeger) & "," &_
     tosql(opleverdatumDD) & "," &_
     tosql(opleverdatumMM) & "," &_
     tosql(opleverdatumJJJJ) & ")"
    Conn.Execute (sqlString)
    'response.Write(sqlString) : response.End()

    dim Varbody
    varbody="<html>" & vbCrlf & _
        " <head>" & vbCrlf & _
        "<title>Client-tool</title>" & vbCrlf & _
            "<style>" & vbCrlf & _
                "table {font-family: Tahoma; font-size:11px; color: #333333;}" & vbCrlf & _
                "a:visited,a:link {color:#333333;text-decoration:underline;}" & vbCrlf & _
                "a:hover {color:#E90900;text-decoration:underline;}" & vbCrlf & _
            "</style>" & vbCrlf & _
        "</head>" & vbCrlf & _
            "<body bgcolor='#FFFFFF' leftmargin='10' topmargin='10' rightmargin='10' bottommargin='10' marginwidth='0' marginheight='0'>" & vbCrlf & _
                "<table width=""500"" border=""0"" cellspacing=""0"" cellpadding=""0"">" & vbCrlf & _
                    "<tr>" & vbCrlf & _
                        "<td></td>" & vbCrlf & _
                    "</tr>" & vbCrlf & _
                    "<tr>" & vbCrlf & _
                        "<td style=""padding-left:10px;""><br>" & vbCrlf & _
                            "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">" & vbCrlf
                                varbody = varbody & "<tr><td width=""200"">&nbsp;</td><td width=""360"">&nbsp;</td></tr>" & vbcrlf & vbcrlf
                                varbody = varbody & "<tr><td colspan=""2"">Er is een aanpassing toegevoegd op de client-tool. <br>Onderstaande gegevens werden ingevuld:<br><br></td></tr>" & vbcrlf & vbcrlf
                                varbody = varbody & "<tr><td>Klant: </td><td>" & request.form("toevoeger") &"</td></tr>" & vbcrlf
                                varbody = varbody & "<tr><td>Aanpassing: </td><td>" & request.form("aanpassing") &"</td></tr>" & vbcrlf
                                varbody = varbody & "</table><br><br></td>" & vbCrlf & _
                    "</tr>" & vbCrlf & _
                "</table>" & vbCrlf & _
            "</body>" & vbCrlf & _
        "</html>"
        Dim ObjEmail: Set ObjEmail=Server.CreateObject("CDONTS.NewMail")
            ObjEmail.BodyFormat = 0 'CdoBodyFormatHTML
            ObjEmail.MailFormat = 0 'CdoMailFormatMime
            objEmail.To = application("email_usergroup")
            objEmail.From = "bla@bla.nl"
            objEmail.Subject = "Aanpassing toegevoegd"
            objEmail.Body = cstr(varbody)
            objEmail.Send
        set objEmail = nothing

END IF
%>

~~~~~~~~~~~~~~~~~~~~~~
What goes around comes around
__________________
~~~~~~~~~~~~~~~~~~~~~~
What goes around comes around
 
Old January 4th, 2007, 06:09 AM
Authorized User
 
Join Date: Dec 2006
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok it's solved! I had to write my emailadress to objEmail.To . :D there are no other things to be changed.

objEmail.To = "bla@bla.nl"

~~~~~~~~~~~~~~~~~~~~~~
What goes around comes around




Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
How to send mail Jolley_tolson PHP How-To 0 August 13th, 2007 03:38 AM
Cannot send mail rajanikrishna JSP Basics 3 March 17th, 2006 01:39 AM
Send E-mail meme2002bh Access ASP 2 September 30th, 2005 12:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.