Simple Form Problem!

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Simple Form Problem!

    Hi,

    I am using a simple form 2 email program. I ama experienced programmer, But
    I feel very bad, as I am unable to fix this problem.

    All seems to be fine, But the mail is not reacing to my mail box. Here is
    the code!

    The form has just three values!

    <%

    name = request.form("name")
    email = request.form("email")
    message = request.form("message")

    If name="" or email="" or message="" Then
    url = "contact.asp?reqd=* indicates required field&name=" & name & "&email="
    & email & "&message=" & message
    If name="" Then
    url = url & "&mname=*"
    End if

    If email="" Then
    url = url & "&memail=*"
    End if

    If message="" Then
    url = url & "&mmessage=*"
    End if


    response.redirect url & "&foobar=foobar#form"
    response.end
    End if


    Dim objCDONTS ' Email object
    Dim strFromName ' From persons' real name
    Dim strFromEmail, strToEmail ' Email addresses
    Dim strSubject, strBody ' Message
    Dim misccompo


    strSubject = "Enquiry from Centwinmills.com website FORM"
    strFromName = Trim(Request.Form("name"))
    strFromEmail = Trim(Request.Form("email"))
    strToEmail = "joe@averagejoe.com"
    strBody = Trim(Request.Form("message"))

    Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
    objCDONTS.From = strFromName & " <" &
    strFromEmail & ">"
    objCDONTS.To = strToEmail
    objCDONTS.Subject = strSubject
    objCDONTS.Body = "--------------------------------------" &
    vbcrlf & vbcrlf & strbody & vbcrlf & vbcrlf & vbcrlf &
    "--------------------------------------------------------------" & vbcrlf &
    "MESSAGE ENDS: End of message"
    objCDONTS.Send
    Set objCDONTS = Nothing

    response.redirect "thanks.asp"
    response.end
    %>

    Jose


    Benny Alexander Guest

  2. Similar Questions and Discussions

    1. Simple Form
      Hi guy's, I am completely new to ColdFusion. I have created a mini-site (www.wealthmasterylive.co.uk). I have a form in it that has the...
    2. Simple Web Form
      not sure how to properly title this question, but here is what i am trying accomplish and would like some direction in obtaining info on how to...
    3. Simple Form Question...
      I have created a form that sits nicely in an email, so that when you get the email you can fill out the form and submit it.... Problem though! ...
    4. Simple Login Form
      hi i am using vs.net with csharp - i am trying to create a simple log in form user id password on submit i run a param query to check if the...
    5. A simple problem with a really simple form
      Hi there, I'm having a problem with designing a very small form in Dreamweaver. Its just a login form with username and password textfields - the...
  3. #2

    Default Re: Simple Form Problem!

    On the webserver, is the mail ending up in the badmail directory?

    Cheers
    Ken

    "Benny Alexander" <ag_BennyREMOVETHIS@Yahoo-Remove_This.com> wrote in
    message news:uN5AWZ5aDHA.1940@TK2MSFTNGP10.phx.gbl...
    : Hi,
    :
    : I am using a simple form 2 email program. I ama experienced programmer,
    But
    : I feel very bad, as I am unable to fix this problem.
    :
    : All seems to be fine, But the mail is not reacing to my mail box. Here is
    : the code!
    :
    : The form has just three values!
    :
    : <%
    :
    : name = request.form("name")
    : email = request.form("email")
    : message = request.form("message")
    :
    : If name="" or email="" or message="" Then
    : url = "contact.asp?reqd=* indicates required field&name=" & name &
    "&email="
    : & email & "&message=" & message
    : If name="" Then
    : url = url & "&mname=*"
    : End if
    :
    : If email="" Then
    : url = url & "&memail=*"
    : End if
    :
    : If message="" Then
    : url = url & "&mmessage=*"
    : End if
    :
    :
    : response.redirect url & "&foobar=foobar#form"
    : response.end
    : End if
    :
    :
    : Dim objCDONTS ' Email object
    : Dim strFromName ' From persons' real
    name
    : Dim strFromEmail, strToEmail ' Email addresses
    : Dim strSubject, strBody ' Message
    : Dim misccompo
    :
    :
    : strSubject = "Enquiry from Centwinmills.com website FORM"
    : strFromName = Trim(Request.Form("name"))
    : strFromEmail = Trim(Request.Form("email"))
    : strToEmail = "joe@averagejoe.com"
    : strBody = Trim(Request.Form("message"))
    :
    : Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
    : objCDONTS.From = strFromName & " <" &
    : strFromEmail & ">"
    : objCDONTS.To = strToEmail
    : objCDONTS.Subject = strSubject
    : objCDONTS.Body = "--------------------------------------" &
    : vbcrlf & vbcrlf & strbody & vbcrlf & vbcrlf & vbcrlf &
    : "--------------------------------------------------------------" & vbcrlf
    &
    : "MESSAGE ENDS: End of message"
    : objCDONTS.Send
    : Set objCDONTS = Nothing
    :
    : response.redirect "thanks.asp"
    : response.end
    : %>
    :
    : Jose
    :
    :


    Ken Schaefer Guest

  4. #3

    Default Re: Simple Form Problem!

    Hen,

    I do not know how to find it? I am in a shared hosting!

    regards,
    Benny
    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    news:uVgRrH6aDHA.3444@tk2msftngp13.phx.gbl...
    > On the webserver, is the mail ending up in the badmail directory?
    >
    > Cheers
    > Ken
    >
    > "Benny Alexander" <ag_BennyREMOVETHIS@Yahoo-Remove_This.com> wrote in
    > message news:uN5AWZ5aDHA.1940@TK2MSFTNGP10.phx.gbl...
    > : Hi,
    > :
    > : I am using a simple form 2 email program. I ama experienced programmer,
    > But
    > : I feel very bad, as I am unable to fix this problem.
    > :
    > : All seems to be fine, But the mail is not reacing to my mail box. Here
    is
    > : the code!
    > :
    > : The form has just three values!
    > :
    > : <%
    > :
    > : name = request.form("name")
    > : email = request.form("email")
    > : message = request.form("message")
    > :
    > : If name="" or email="" or message="" Then
    > : url = "contact.asp?reqd=* indicates required field&name=" & name &
    > "&email="
    > : & email & "&message=" & message
    > : If name="" Then
    > : url = url & "&mname=*"
    > : End if
    > :
    > : If email="" Then
    > : url = url & "&memail=*"
    > : End if
    > :
    > : If message="" Then
    > : url = url & "&mmessage=*"
    > : End if
    > :
    > :
    > : response.redirect url & "&foobar=foobar#form"
    > : response.end
    > : End if
    > :
    > :
    > : Dim objCDONTS ' Email object
    > : Dim strFromName ' From persons' real
    > name
    > : Dim strFromEmail, strToEmail ' Email addresses
    > : Dim strSubject, strBody ' Message
    > : Dim misccompo
    > :
    > :
    > : strSubject = "Enquiry from Centwinmills.com website FORM"
    > : strFromName = Trim(Request.Form("name"))
    > : strFromEmail = Trim(Request.Form("email"))
    > : strToEmail = "joe@averagejoe.com"
    > : strBody = Trim(Request.Form("message"))
    > :
    > : Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
    > : objCDONTS.From = strFromName & " <" &
    > : strFromEmail & ">"
    > : objCDONTS.To = strToEmail
    > : objCDONTS.Subject = strSubject
    > : objCDONTS.Body = "--------------------------------------" &
    > : vbcrlf & vbcrlf & strbody & vbcrlf & vbcrlf & vbcrlf &
    > : "--------------------------------------------------------------" &
    vbcrlf
    > &
    > : "MESSAGE ENDS: End of message"
    > : objCDONTS.Send
    > : Set objCDONTS = Nothing
    > :
    > : response.redirect "thanks.asp"
    > : response.end
    > : %>
    > :
    > : Jose
    > :
    > :
    >
    >

    Benny Alexander Guest

  5. #4

    Default Re: Simple Form Problem!

    You'll need to ask your ISP.

    One thing to be aware of - the From: domain needs to be resolvable in the
    DNS. If the From: address contains a non-existant domain, then your mail
    will not be delivered by the MS SMTP server. So, when testing this page,
    make sure that the From: address you put in has a valid domain.

    Otherwise, just looking quickly over your code, it seems fine.

    Cheers
    Ken

    "Benny Alexander" <ag_BennyREMOVETHIS@Yahoo-Remove_This.com> wrote in
    message news:uDrBuaFbDHA.2632@TK2MSFTNGP09.phx.gbl...
    : Hen,
    :
    : I do not know how to find it? I am in a shared hosting!
    :
    : regards,
    : Benny


    Ken Schaefer Guest

  6. #5

    Default Re: Simple Form Problem!

    Ken

    Thanks for the advice.

    I check from my local webserver too. Its all bounced back to my bad mail
    folder.

    How would I do a valid domain config? Can you advice more?

    Regards,
    Benny
    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    news:OxSJmlFbDHA.2932@tk2msftngp13.phx.gbl...
    > You'll need to ask your ISP.
    >
    > One thing to be aware of - the From: domain needs to be resolvable in the
    > DNS. If the From: address contains a non-existant domain, then your mail
    > will not be delivered by the MS SMTP server. So, when testing this page,
    > make sure that the From: address you put in has a valid domain.
    >
    > Otherwise, just looking quickly over your code, it seems fine.
    >
    > Cheers
    > Ken
    >
    > "Benny Alexander" <ag_BennyREMOVETHIS@Yahoo-Remove_This.com> wrote in
    > message news:uDrBuaFbDHA.2632@TK2MSFTNGP09.phx.gbl...
    > : Hen,
    > :
    > : I do not know how to find it? I am in a shared hosting!
    > :
    > : regards,
    > : Benny
    >
    >

    Benny Alexander Guest

  7. #6

    Default Re: Simple Form Problem!

    Well, the From: address needs to be a valid domain...

    So, for example, you could try:

    [email]someone@hotmail.com[/email]

    since hotmail.com is a valid domain (the SMTP server doesn't check the
    actual account, just the domain). Also, you'll need to be connected to the
    'Net when you do this (so that the SMTP server can go out and check that
    hotmail.com actually exists)

    Cheers
    Ken


    "Benny Alexander" <ag_BennyREMOVETHIS@Yahoo-Remove_This.com> wrote in
    message news:enf$dEGbDHA.2372@TK2MSFTNGP10.phx.gbl...
    : Ken
    :
    : Thanks for the advice.
    :
    : I check from my local webserver too. Its all bounced back to my bad mail
    : folder.
    :
    : How would I do a valid domain config? Can you advice more?
    :
    : Regards,
    : Benny
    : "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    : news:OxSJmlFbDHA.2932@tk2msftngp13.phx.gbl...
    : > You'll need to ask your ISP.
    : >
    : > One thing to be aware of - the From: domain needs to be resolvable in
    the
    : > DNS. If the From: address contains a non-existant domain, then your mail
    : > will not be delivered by the MS SMTP server. So, when testing this page,
    : > make sure that the From: address you put in has a valid domain.
    : >
    : > Otherwise, just looking quickly over your code, it seems fine.
    : >
    : > Cheers
    : > Ken
    : >
    : > "Benny Alexander" <ag_BennyREMOVETHIS@Yahoo-Remove_This.com> wrote in
    : > message news:uDrBuaFbDHA.2632@TK2MSFTNGP09.phx.gbl...
    : > : Hen,
    : > :
    : > : I do not know how to find it? I am in a shared hosting!
    : > :
    : > : regards,
    : > : Benny
    : >
    : >
    :
    :


    Ken Schaefer Guest

  8. #7

    Default Re: Simple Form Problem!

    Ken,

    Even now I am not able to get it, I test with various email ids!

    Benny

    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    news:u6ITgoGbDHA.3444@tk2msftngp13.phx.gbl...
    > Well, the From: address needs to be a valid domain...
    >
    > So, for example, you could try:
    >
    > [email]someone@hotmail.com[/email]
    >
    > since hotmail.com is a valid domain (the SMTP server doesn't check the
    > actual account, just the domain). Also, you'll need to be connected to the
    > 'Net when you do this (so that the SMTP server can go out and check that
    > hotmail.com actually exists)
    >
    > Cheers
    > Ken
    >
    >
    > "Benny Alexander" <ag_BennyREMOVETHIS@Yahoo-Remove_This.com> wrote in
    > message news:enf$dEGbDHA.2372@TK2MSFTNGP10.phx.gbl...
    > : Ken
    > :
    > : Thanks for the advice.
    > :
    > : I check from my local webserver too. Its all bounced back to my bad mail
    > : folder.
    > :
    > : How would I do a valid domain config? Can you advice more?
    > :
    > : Regards,
    > : Benny
    > : "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    > : news:OxSJmlFbDHA.2932@tk2msftngp13.phx.gbl...
    > : > You'll need to ask your ISP.
    > : >
    > : > One thing to be aware of - the From: domain needs to be resolvable in
    > the
    > : > DNS. If the From: address contains a non-existant domain, then your
    mail
    > : > will not be delivered by the MS SMTP server. So, when testing this
    page,
    > : > make sure that the From: address you put in has a valid domain.
    > : >
    > : > Otherwise, just looking quickly over your code, it seems fine.
    > : >
    > : > Cheers
    > : > Ken
    > : >
    > : > "Benny Alexander" <ag_BennyREMOVETHIS@Yahoo-Remove_This.com> wrote in
    > : > message news:uDrBuaFbDHA.2632@TK2MSFTNGP09.phx.gbl...
    > : > : Hen,
    > : > :
    > : > : I do not know how to find it? I am in a shared hosting!
    > : > :
    > : > : regards,
    > : > : Benny
    > : >
    > : >
    > :
    > :
    >
    >

    Benny Alexander Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139