authenticated smtp problem

i have build a website with a joboffers form i have used a program that called wysiwygwebbuilder everything works wel but when i send the form than it is not comming in my emailbox
when asked the host the told me that the php code was not correct this seems to be the problem : In order to use PHP mail is just like in outlook requires authenticated smtpwhat do i need to change manualy in the php form/code to get it working.
The code is only a part of it otherwise i exceeded the ma caracters.

Adagi

[php]<?php
function ValidateEmail($email)
{
$pattern = ‘/^(0-9a-z@(([0-9a-z])+([-\w][0-9a-z])*.)+[a-z]{2,6})$/i’;
return preg_match($pattern, $email);
}

if($_SERVER[‘REQUEST_METHOD’] == ‘POST’)
{
$mailto = ‘****@*****.nl’;
$mailfrom = isset($_POST[‘email’]) ? $_POST[‘email’] : $mailto;
$subject = ‘Sollicitatie Charly’s angels’;
$message = ‘Sollicitatie Charly’s angels escort:’;
$success_url = ‘./Bedankt.html’;
$error_url = ‘./Fout.html’;
$error = ‘’;
$eol = “\n”;
$max_filesize = isset($_POST[‘filesize’]) ? $_POST[‘filesize’] * 1024 : 1024000;
$boundary = md5(uniqid(time()));

  $header  = 'From: '.$mailfrom.$eol;
  $header .= 'Reply-To: '.$mailfrom.$eol;
  $header .= 'MIME-Version: 1.0'.$eol;
  $header .= 'Content-Type: multipart/mixed; boundary="'.$boundary.'"'.$eol;
  $header .= 'X-Mailer: PHP v'.phpversion().$eol;
  if (!ValidateEmail($mailfrom))
  {
     $error .= "The specified email address is invalid!\n<br>";
  }

  if (!empty($error))
  {
     $errorcode = file_get_contents($error_url);
     $replace = "##error##";
     $errorcode = str_replace($replace, $error, $errorcode);
     echo $errorcode;
     exit;
  }

  $internalfields = array ("submit", "reset", "send", "captcha_code");
  $message .= $eol;
  $message .= "IP Address : ";
  $message .= $_SERVER['REMOTE_ADDR'];
  $message .= $eol;
  foreach ($_POST as $key => $value)
  {
     if (!in_array(strtolower($key), $internalfields))
     {
        if (!is_array($value))
        {
           $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
        }
        else
        {
           $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
        }
     }
  }

[/php]

this topic can be closed… i have used the dbts form prossesor this supports the autenticated smtp and eveything works fine now.

Sponsor our Newsletter | Privacy Policy | Terms of Service