problem with PHP contact form

Discussion in 'HTML & Website Design' started by clouting, Oct 12, 2007.

  1. #1
    hey..............

    have got a problem with my php contact form. It will not work. have got a domain email address and have set up a 'forwarder' to my hotmail account.

    Sure i have missed some thing really simple. Any ideas?
     
    clouting, Oct 12, 2007 IP
  2. jBud

    jBud Peon

    Messages:
    387
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    anything to look at?
    code would be helpful...
     
    jBud, Oct 12, 2007 IP
  3. YIAM

    YIAM Notable Member

    Messages:
    2,480
    Likes Received:
    240
    Best Answers:
    0
    Trophy Points:
    280
    #3
    Post your code here..
     
    YIAM, Oct 12, 2007 IP
  4. clouting

    clouting Guest

    Messages:
    120
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    this is where i think i need to do something or have done something wrong.

    if (SmartyValidate :: is_valid($data, 'contact_form'))
    {
    require_once 'libs/phpmailer/class.phpmailer.php';
    $mail = new PHPMailer();
    $mail->PluginDir = 'libs/phpmailer/';
    $mail->Mailer = 'mail';
    $mail->From = $data['email'];
    $mail->FromName = $data['name'];
    $mail->Subject = $data['reason'];
    $mail->Body = $data['message'];
    $mail->AddAddress('szefler@linkdirectorynow.com', 'ben');
    if (!$mail->Send())
    {
    $tpl->assign('error', true);
    }
    else
    {
    $tpl->assign('success', true);
    }
    $mail->ClearAddresses();

    }
     
    clouting, Oct 12, 2007 IP
  5. YIAM

    YIAM Notable Member

    Messages:
    2,480
    Likes Received:
    240
    Best Answers:
    0
    Trophy Points:
    280
    #5
    So it is PHPLD, Which Version? What error message are you getting??
     
    YIAM, Oct 12, 2007 IP
  6. clouting

    clouting Guest

    Messages:
    120
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    phpLD-2.1.3
     
    clouting, Oct 12, 2007 IP
  7. clouting

    clouting Guest

    Messages:
    120
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    its not so much an error. the code is working but it says the email can't be sent.

    contact page- click here to see the form

    i'm sure im forgetting something obvious.
     
    clouting, Oct 12, 2007 IP
  8. jgjg

    jgjg Peon

    Messages:
    595
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #8
    not sure what the problem is, but don't be surprised if the emails don't get forwarded to your hotmail account.

    I was messing with something similar the other day and hotmail will often block out these forwarded messages unless there is a msn or hotmail address in the from field.

    not a big deal but you may have to login to webmail to see messages
     
    jgjg, Oct 15, 2007 IP