+ Reply to Thread
Results 1 to 7 of 7

Thread: Are there any Flash/send_email.php guru's about?

  1. #1
    ridebmx's Avatar
    ridebmx is offline Web Designer
    Join Date
    Apr 2008
    Location
    Wellington, New Zealand
    Posts
    33
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Are there any Flash/send_email.php guru's about?

    I am having a blonde day, I swear I cant see what I am doing wrong today.

    On my server I am already running a flash site, with contact form which works.

    But today, I cannot get an html file including a flash contact form to work for the life of me!
    Same form, same send_email.php file....
    It's hanging at the sending, as if php isnt activated on the server, but I am assuming it is as the other site would fail too if it wasnt?

    Anyone able to kick me in the pants about this?
    It's gotta be simple lol

  2. #2
    Alan B's Avatar
    Alan B is offline Super Moderator
    Join Date
    Jul 2007
    Location
    Toronto, Canada
    Posts
    1,386
    WHB Points this Month
    0.00
    WHB Points
    290.00
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default

    Remember that any address that you use as the FROM (sender address) must first exist on the server as either a mail account or a mail forwarder.
    I am not WHB staff and I am not paid.
    I provide help in these forums on my own time.

  3. #3
    ridebmx's Avatar
    ridebmx is offline Web Designer
    Join Date
    Apr 2008
    Location
    Wellington, New Zealand
    Posts
    33
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmm, I have used a gmail account as a test account before and it worked.....
    Although you have me doubting now heh.

    Tis a very simple php file,
    <?php
    $contact_name = $_POST[‘name’];
    $contact_email = $_POST[‘email’];
    $contact_subject = $_POST[’subject’];
    $contact_message = $_POST[‘message’];

    if( $contact_name == true )
    {
    $sender = $contact_email;
    $receiver = “c1webdesign@gmail.com”;
    $client_ip = $_SERVER[‘REMOTE_ADDR’];

    $email_body = “Name: $contact_name \nEmail: $sender \nSubject: $contact_subject \nMessage: $contact_message \nIP: $client_ip \nFlash Contact Form provided by http://www.c1webdesigns.com”;
    $email_body_auto_reply = “Hello $contact_name, \nWe have sent your form to N.Z.B.Z.D.D and they will be in touch as soon as possible. Thank you for your time and query. \nAdmin - http://www.badd.co.nz";

    $extra = “From: $sender\r\n“ . “Reply-To: $sender \r\n“ . “X-Mailer: PHP/” . phpversion();
    $extra_auto_reply = “From: $receiver\r\n“ . “Reply-To: $receiver \r\n“ . “X-Mailer: PHP/” . phpversion();

    mail( $sender, “Auto Reply - Re: $subject”, $email_body_auto_reply, $extra_auto_reply ); // auto reply mail to sender

    if( mail( $receiver, “N.Z.B.A.D.D Contact Form - $contact_subject”, $email_body, $extra ) )
    {
    echo “success=yes”;
    }
    else
    {
    echo “success=no”;
    }
    }

    ?>

  4. #4
    Alan B's Avatar
    Alan B is offline Super Moderator
    Join Date
    Jul 2007
    Location
    Toronto, Canada
    Posts
    1,386
    WHB Points this Month
    0.00
    WHB Points
    290.00
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default

    As I said, the sender must exist on the server. This is to help prevent spam originating from these servers.
    I am not WHB staff and I am not paid.
    I provide help in these forums on my own time.

  5. #5
    ridebmx's Avatar
    ridebmx is offline Web Designer
    Join Date
    Apr 2008
    Location
    Wellington, New Zealand
    Posts
    33
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The sender or the receiver?

    As the sender is the person who is filling in the form, so they wont have an address that exists on the server.........?

  6. #6
    Alan B's Avatar
    Alan B is offline Super Moderator
    Join Date
    Jul 2007
    Location
    Toronto, Canada
    Posts
    1,386
    WHB Points this Month
    0.00
    WHB Points
    290.00
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default

    The sender is whatever address actually sends the message from the server/form. If you are setting the person filling the form as the sender, then that is not valid on these servers.
    I am not WHB staff and I am not paid.
    I provide help in these forums on my own time.

  7. #7
    ridebmx's Avatar
    ridebmx is offline Web Designer
    Join Date
    Apr 2008
    Location
    Wellington, New Zealand
    Posts
    33
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmm, then pray tell, how would I set this code up to use something else as the sender?

    (Also why does this work on another site, on the same server?)

+ Reply to Thread

Posting Permissions

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