Top VPS Hosting Provider

Welcome to the myhosting.com Forums.
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    RickRoy is offline Junior Member
    Join Date
    Jul 2008
    Posts
    1

    Default Emails from Forms in front page

    I am using Front Page to create fill-in forms. I need a form that can be filled out on line, posted to a spreadsheet and the data emailed to the appropriate person. This used to happen in the past on myhosting.com but over recent years, we haven’t been able to get the email notifications and it is important that we do. We still can download the csv data but we would like the heads-up achieved with the emails that a new posting has been submitted. Ideas anyone?

  2. #2
    community-manager is offline Silver Member
    Join Date
    May 2008
    Posts
    40

    Default Re: Emails from Forms in front page

    Hello RickRoy,

    That is interesting, I will look into your problem and see if I can come up with a solution.

    Thanks,
    Timur Catakli
    myhosting.com - Community Manager
    ---------------------------------------------------------
    cm@myhosting.com
    http://www.myhosting.com
    ---------------------------------------------------------
    Your trusted web hosting company since 1997

  3. #3
    tonyp is offline Junior Member
    Join Date
    Apr 2008
    Posts
    3

    Default Re: Emails from Forms in front page

    You need to hire a programmer to build the page for you. What you need is something simple so an experienced programmer should take more that 30 min to create the page.

    Below is a sample of how the page will work. Save the code to a file named email.asp and place it on your site. Then visit the page by going to http://yourdomainname.com/email.asp. The page will ask for an email address. When the form is submitted it will save the email address to a file named /cgi-bin/EmailAddresses.csv and it will send an email. Replace yourdomainname.com in the code with your actual domain name.

    <html>
    <head>
    </head>
    <body>
    <%
    if Request.Form("SubmitForm") = "1" then

    Dim EmailAddress
    EmailAddress = Request("EmailAddress")

    'write to csv file
    Dim FileName
    FileName = Server.MapPath("/cgi-bin/") & "\EmailAddresses.csv"
    'Response.Write(FileName)
    'Response.End

    Dim objFSO
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

    Dim objLogFile
    Set objLogFile = objFSO.OpenTextFile(FileName, 8, True)
    objLogFile.Writeline(EmailAddress)
    objLogFile.Close


    'send an email
    Dim MyJMail
    Set MyJMail = Server.CreateObject("JMail.Message")
    MyJMail.Logging = True
    MyJMail.From = "person@yourdomainname.com"
    MyJMail.FromName = "My Name"
    MyJMail.Subject = "Email Address"
    MyJMail.AddRecipient("person@yourdomainname.com")
    MyJMail.Body = "Form submitted with " & EmailAddress
    Dim SendValue
    SendValue = MyJMail.Send("mail.yourdomainname.com")
    'Response.Write(SendValue)
    'Response.End

    %>


    The email address has been written to file and an email has been sent.</p>
    <%
    else
    %>
    <form method="POST" action="email.asp">
    <input type="hidden" name="SubmitForm" Value="1"></p>


    Enter your email address.

    <input type="text" name="EmailAddress" size="20"></p>


    <input type="submit" value="Submit" name="B1"></p>
    </form>
    <%
    end if
    %>
    </body>
    </html>

  4. #4
    community-manager is offline Silver Member
    Join Date
    May 2008
    Posts
    40

    Default Re: Emails from Forms in front page

    Thank you Tony...
    Timur Catakli
    myhosting.com - Community Manager
    ---------------------------------------------------------
    cm@myhosting.com
    http://www.myhosting.com
    ---------------------------------------------------------
    Your trusted web hosting company since 1997


 

Similar Threads

  1. Published Page not what I published - asp.net master page
    By jimbaum in forum Troubleshooting
    Replies: 1
    Last Post: 2008-09-10, 11:17 AM

Posting Permissions

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