iWeb email integration?

Discussion in 'Web Design and Development' started by binaural42, Aug 23, 2010.

  1. binaural42 macrumors newbie

    Joined:
    Aug 23, 2010
    #1
    Hello, I designed a webpage using iWeb and cannot for the life of me figure out how to implement email. What I want is for visitors to be able to send email directly from the site to me. I downloaded iTweak but I can't get it to work with my site since I upload it through ftp and not MobileMe. I've done many searches concerning this and found many links that lead me nowhere. Anybody got a simple solution?

    Thanks!

    Here's the site: www.espantapajarosmusic.com
     
  2. FourCandles macrumors 6502a

    Joined:
    Feb 10, 2009
    Location:
    England
  3. binaural42 thread starter macrumors newbie

    Joined:
    Aug 23, 2010
    #3
    No. I don't want a button that launches the Mail application. I want users to be able to type the email right in the page and send it, similar to a guestbook form so they can type their email address, a subject and the message within a form.
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    You'll need to use a form that goes through a 3rd party site because MobileMe has no server side processing that is required for this.
     
  5. etchtech09 macrumors member

    Joined:
    Jun 25, 2010
    #5
    You said you upload through FTP not MobileMe, do you know if the server that serves your page supports PHP or other server-side scripting?
     
  6. binaural42 thread starter macrumors newbie

    Joined:
    Aug 23, 2010
    #6
    I understand I'll have to set up the form with some other site and use the HTML code to put it in my site I just can't find one that works for me.

    etchtech, I don't know but I just emailed the host tech support and asked them.
     
  7. binaural42 thread starter macrumors newbie

    Joined:
    Aug 23, 2010
    #7
    and this is what they replied:

    "PHP is no problem, but what other services were you looking to have?"

    Thanks for your help.
     
  8. Alphakline macrumors regular

    Alphakline

    Joined:
    Nov 30, 2003
    Location:
    Los Angeles, CA
    #8
    Use jotform.com. It's fast, easy and free! You create the form, then place the HTML code into a HTML snippet.
     
  9. etchtech09 macrumors member

    Joined:
    Jun 25, 2010
    #9
    This is a sample page...

    <?php
    if (isset($_POST['submit'])) { //Handle the form
    // To email
    $to = "email@domain.com"; //Where to send email
    $subject = "Comments From Site"; //The subject
    $headers = "-f" . $_POST['sender']; //Their address
    $msg = $_POST['message']; //The actual message
    mail ($to, $subject, $msg, null, $headers); //The mail function
    $view_msg = "Mail Sent";
    } else {
    $view_msg = "
    <BODY>
    <FORM action='" . $_SERVER['PHP_SELF'] . "' method=post name='email'>
    From: <INPUT type=text name='sender'>
    <BR />
    Message: <INPUT type=textarea name='message'>
    <BR />
    <INPUT type=submit name=submit value='Submit' />
    </FORM><!-- End of Form -->";
    }

    echo $view_msg;
    ?>
     
  10. etchtech09 macrumors member

    Joined:
    Jun 25, 2010
    #10
    The above code would work with a little modification for your site. I would recommend doing some sort of validation on the form, but otherwise it should work for you.

    Remember, for php, php.net is your best friend.
     
  11. binaural42 thread starter macrumors newbie

    Joined:
    Aug 23, 2010
    #11
    echtech, I can't get that code to work... I don't know squat about HTML (that's why I'm using iWeb) I'm sure I'm supposed to modify certain things but have no clue what.

    Alphakline: Thanks! That looks light it may work, my only problem right now is that the form looks fine on iweb but on the actual browser you can't see the Submit button very well and when I send myself a test email, I get a message with a bunch of code, I can't read anything...
     
  12. etchtech09 macrumors member

    Joined:
    Jun 25, 2010
    #12
    For the code to work, it needs to be on a server that supports php and in a file with the extension .php.
     

Share This Page