A&P someone help me with a php contact form. v.imgoingtosmashmyfacethroughmycomputer

Discussion in 'Lifestyle' started by jared_IRL, Dec 9, 2008.

  1. jared_IRL

    jared_IRL OT Supporter

    Joined:
    Feb 12, 2006
    Messages:
    17,726
    Likes Received:
    51
    All day i've been working on getting this fucking contact form to send me an email when someone fills it out.


    all day i've failed.

    The form references an email.php file that's on my webserver.

    I don't know what information you'd need to help me, so ask and i'll give you what I got.

    i'm definitely drinking tonight.
     
  2. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    some of the code might help lol
     
  3. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    oh by the way, I do web development with PHP, so I could probably help. post what you've got and ill take a look at it
     
  4. jared_IRL

    jared_IRL OT Supporter

    Joined:
    Feb 12, 2006
    Messages:
    17,726
    Likes Received:
    51
    wow. now I really think I fucked something up.

    I can't even access mail.32countiesphoto.com anymore...

    goddam it.



    anyway, here's what I got.

    In my contact form, I have this:

    <!-- CONTACT FORM SETTINGS -->

    &contactform=6&

    &formtext=Please fill out the form below.

    &formthanks=Thank you for filling out the form. We will be in contact with you shortly.

    &recipient="[email protected]"&

    &subject=Contact Form&

    &scriptlocation=email.php&


    then, in my email.php form, I have this:

    <?php

    //echo "<html><body>";
    $recipient=$_POST["recipient"];
    $subject=$_POST["subject"];
    $whofrom="[email protected]";
    while (list ($key, $val) = each ($_POST)){
    $message=$message."".$key.": ".$val."\r\n";
    }
    mail ($recipient, $subject, $message,"From: ".$whofrom."\r\nReply-To: ".$whofrom."\r\n");

    //echo "Sending mail...";
    //echo "</body></html>";

    ?>


    Then, outta nowhere, if I use my webservers 'webmail' function, under the administrator account (not my account), I get this:

    A message that you sent contained one or more recipient addresses that were
    incorrectly constructed:

    \"[email protected]\": malformed address: \" may not follow \"[email protected]

    This address has been ignored. There were no other addresses in your
    message, and so no attempt at delivery was possible.

    ------ This is a copy of your message, including all the headers. ------

    To: \"[email protected]\"
    Subject: Contact Form
    X-PHP-Script: www.32countiesphoto.com/email.php for 76.99.132.110
    From: [email protected]
    Reply-To: [email protected]
    Message-Id: <[email protected]>
    Date: Tue, 09 Dec 2008 18:00:41 -0500


    script: email.php
    recipient: \"[email protected]\"
    subject: Contact Form
    Name: fuck
    Email: [email protected]
    Comments: this sucks
     
  5. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    where you have:

    Code:
    $recipient=$_POST["recipient"];
    
    try changing it to:
    Code:
    $recipient=stripslashes($_POST["recipient"]);
    
     
  6. jared_IRL

    jared_IRL OT Supporter

    Joined:
    Feb 12, 2006
    Messages:
    17,726
    Likes Received:
    51
    changed that, got this:

    This message was created automatically by mail delivery software.

    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:

    "[email protected]"@server8.namecheaphosting.com
    Unrouteable address

    ------ This is a copy of the message, including all the headers. ------

    Return-path: <[email protected]>
    Received: from spauo by server8.namecheaphosting.com with local (Exim 4.69 (FreeBSD))
    (envelope-from <[email protected]>)
    id 1LABgf-000A2G-J2
    for "[email protected]"@server8.namecheaphosting.com; Tue, 09 Dec 2008 18:08:17 -0500
    To: "[email protected]"@server8.namecheaphosting.com
    Subject: Contact Form
    X-PHP-Script: www.32countiesphoto.com/email.php for 76.99.132.110
    From: [email protected]
    Reply-To: [email protected]
    Message-Id: <[email protected]>
    Date: Tue, 09 Dec 2008 18:08:17 -0500





    Really stupid question... could the quotes around my email here be fucking this up?

    &recipient="[email protected]"&
     
  7. jared_IRL

    jared_IRL OT Supporter

    Joined:
    Feb 12, 2006
    Messages:
    17,726
    Likes Received:
    51
    oh, and I owe you a beer for helping me out with this, whether it works or not...

    much appreciated!
     
  8. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    Yeah, something is messing up with the recipient. For some reason it's appending "@server8.namecheaphosti ng.com" to the end of the recipient. I'll need to look at it a little closer, but I'm in a class right now. We'll figure it out.
     
  9. jared_IRL

    jared_IRL OT Supporter

    Joined:
    Feb 12, 2006
    Messages:
    17,726
    Likes Received:
    51
    cool, take your time. I'm in no rush.

    I fixed what I fucked so I can get back to my email, so i'm happy enough with that for now.
     
  10. jared_IRL

    jared_IRL OT Supporter

    Joined:
    Feb 12, 2006
    Messages:
    17,726
    Likes Received:
    51
    couple o updates:

    I can't seem to get rid of this: "[email protected]"@server8.namecheaphosting.com" error

    However, if I set the recipient to just 'webmaster' instead of '[email protected]', the email correctly goes to the [email protected] mailbox, but it is entered as [email protected]

    I am now trying to just have '[email protected]' forwarded to [email protected], but they're telling me I can't set up forwarding for a 'server8.namecheaphosting.com' address


    So I'm fucking stuck again.

    ideas?
     
  11. jared_IRL

    jared_IRL OT Supporter

    Joined:
    Feb 12, 2006
    Messages:
    17,726
    Likes Received:
    51
    in case anyone cares, here are a few of the email errors I got trying different things:

    (spauo = webmaster)

    then when it worked:

    and if I try changing it from spauo to jared:

     
  12. tetsuo

    tetsuo And shepherds we shall be...

    Joined:
    May 6, 2004
    Messages:
    9,444
    Likes Received:
    0
    have you tried taking the quotes out of your email address? those seem to be what is causing the error
     
  13. jared_IRL

    jared_IRL OT Supporter

    Joined:
    Feb 12, 2006
    Messages:
    17,726
    Likes Received:
    51
    I thought so too, but with the quotes in the spauo (webmaster) address functions correctly.

    Here's the clusterfuck I have going on right now -

    [email protected] is set to forward to [email protected] by way of forwarding the subject line 'contact form'

    [email protected] then forwards all mail to [email protected] by way of a 'forward all mail' filter...


    It's fucking gay, but it's working...
     

Share This Page