Dismiss Notice

Welcome To CK5!

Registering is free and easy! Hope to see you on the forums soon.

Score a FREE t-shirt and membership sticker when you sign up for a Premium Membership and choose the recurring plan.

Webmasters or web page creators

Discussion in 'The Lounge' started by BranndonC, Feb 13, 2005.

  1. BranndonC

    BranndonC 3/4 ton status

    Joined:
    Mar 18, 2002
    Posts:
    8,591
    Likes Received:
    0
    Location:
    Anaheim, Ca
    is there a simple way to put forms in pages that send the results to an email address? i used frontpage years ago, but is there any simple way to do it now-a-days?
     
  2. eclipse

    eclipse 1/2 ton status

    Joined:
    Jan 1, 2005
    Posts:
    1,245
    Likes Received:
    0
    Location:
    Sparks, NV
    Search the internet for Form scripts. I use to do alot of webpage work a few years ago and I use to find alot of sites with free scripts that you could copy and paste the code into your webpage.
     
  3. BranndonC

    BranndonC 3/4 ton status

    Joined:
    Mar 18, 2002
    Posts:
    8,591
    Likes Received:
    0
    Location:
    Anaheim, Ca
    i've done that, but to e-mail them it needs some sort of special server or something that i dont under stand
     
  4. eclipse

    eclipse 1/2 ton status

    Joined:
    Jan 1, 2005
    Posts:
    1,245
    Likes Received:
    0
    Location:
    Sparks, NV
    Ohh you want a script to send out email. Probably a script like that would be cgi or php... something along that lines, which usually needs server support. Who is your server?
     
  5. eagle mark

    eagle mark 1/2 ton status

    Joined:
    Nov 18, 2004
    Posts:
    3,289
    Likes Received:
    1
    Location:
    North Idaho!
    Most any server has a mail server. Ask them the path.
     
  6. newyorkin

    newyorkin 1 ton status

    Joined:
    May 8, 2001
    Posts:
    16,555
    Likes Received:
    157
    Location:
    Los Estados Unitos
    I've done what you're looking for, but only when the site is running on a windows server that supports asp/scripting. I'm sure it can be done with linux/cgi hosts, but I have no idea how to approach that...

    My site is no longer on a windows host, so I can't link you to show you, but essentially, you have 2 "pages" on the server; 1 is the html form, the other is the script that takes action when "submit" is hit. There's an optional third page that the user can be redirected to after they hit submit (like a "Thanks for your feedback" or something). The user's browser shouldn't ever see the script, the server actually runs it and does the work.

    I didn't actually write mine, my buddy who is an ASP genius did, but I've dissected it and I pretty much understand what it does.
    If you're interested, I could email you the code pages. If you don't want to re-work them altogether, there are just a couple variables you replace with your own data, and you're good to go.
     
  7. eagle mark

    eagle mark 1/2 ton status

    Joined:
    Nov 18, 2004
    Posts:
    3,289
    Likes Received:
    1
    Location:
    North Idaho!
  8. mr_clean

    mr_clean 1/2 ton status

    Joined:
    Sep 21, 2003
    Posts:
    348
    Likes Received:
    0
    Location:
    Sacramento, CA
    Here is two ways to do it in IIS environment

    first way (no outlook object required)

    'Sending automated email response below.
    'MyMailFrom, MyMailTo, and
    'MyMailSubject are variables stored in Globals.asp
    'Syntax is as follows:
    'obj.Send "From, To, Subject, Body, Importance"

    MyMailBody = "email text you want to send"
    Set myMail = server.CreateObject("CDONTS.NewMail")
    myMail.Send MyMailFrom, MyMailTo, MyMailSubject, MyMailBody, 2
    Set myMail = Nothing

    2nd way (outlook required)

    Function EmailWarning (EAddress, DocPath, MySubject, MyBody)
    Set objOutlook = New Outlook.Application
    Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
    With objOutlookMsg
    .To = EAddress
    .Subject = MySubject
    .HTMLBody = MyBody
    .Send
    End With
    'close objects and free up memory
    Set objOutlookMsg = Nothing
    Set objOutlook = Nothing
    End Function

    then link the button onclick action to call this function.

    These worked for me in an ASP environment, however with outlook, user interaction is required as automated emails mimic viruses.

    In a Unix apache environment you would do something similar but just call the pine or sendmail application (there is another one too but I don't remember) to create and send your email.

    If your hosting this webpage on a free site, it's unlikely they will support this functionality. There are many ways to do this but you need to know the specifics of your hosts setup.

    hope this helps somewhat.

    Scott
     

Share This Page