Error !

"; if(!$xname) $errorMessage .= "Please enter your name.
"; if(!$xemail) $errorMessage .= "Please enter your email.
"; if(!$xmsg) $errorMessage .= "Please specify your inquiry.
"; if(!$_SERVER['HTTP_USER_AGENT'] || ($_SERVER['HTTP_USER_AGENT'] == '')) $errorMessage .= "An unknown error occured.
"; $errorMessage .= "

"; $name = $xname; $email = $xemail; $msg = $xmsg; } if ( (mb_strlen($xname) >= 3) && ( (strlen($xemail) >= 6) ) && (mb_strlen($xmsg) >= 6) && ($_SERVER['HTTP_USER_AGENT'] !== '') ) { $VIRTUAL_REMOTE_HOST = gethostbyaddr( $_SERVER['REMOTE_ADDR'] ); if (!$REMOTE_HOST ) $REMOTE_HOST = "NULL"; if (!$VIRTUAL_REMOTE_HOST ) $VIRTUAL_REMOTE_HOST = "NULL"; if (strlen($xemail) < 6) $xemail = "unknown_email_address"; date_default_timezone_set("Asia/Singapore"); $date = date("d/m/Y H:i:s"); include_once SHARED_DIR."/classes/swift/swift_required.php"; $m1 = Swift_Message::newInstance("[milenko.prvacki.com] :: inquiry :: $date"); //subject if (substr($xemail, 0, 6) === "test++") { $params = explode("@", $xemail); $params = explode("++", $params[0]); if (strlen($params[1]) < 3) $params[1] = DEFAULT_TEST_NTFY; $siteNotify = (object)$notifySettings["test"]; $notifySrvr = $notifySrvr->{$params[1]}; } else { $siteNotify = (object)$notifySettings[LIVE_DOMAIN]; $notifySrvr = $notifySrvr->{$siteNotify->notify_srvr}; } $notifyServiceName = explode("@", $notifySrvr->login_usr)[0]; $m1_body_text = "- - - - - - - - - - - - - - - - - - - - - - - - - \r\nWebsite inquiry [ $date ] :\r\n- - - - - - - - - - - - - - - - - - - - - - - - - \r\nName: $xname\r\nE-mail: $xemail\r\n\r\nMessage:\r\n- - - - - - - - - - - - - - - - - - - - - - - - - \r\n$xmsg\r\n\r\n\r\n- - - - - - - - - - - - - - - - - - - - - - - - - \r\n- - - - - - - - - - - - - - - - - - - - - - - - - \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n::SYSTEM MESSAGE ::\r\nNTFY Service: $notifyServiceName\r\nRemote host: $REMOTE_HOST\r\nSpecified hostname: $VIRTUAL_REMOTE_HOST.\r\nSender's IP Address: $_SERVER[REMOTE_ADDR]\r\nSender's User-Agent string:\r\n$_SERVER[HTTP_USER_AGENT]."; $m1->addPart($m1_body_text, 'text/plain'); $m1->setFrom(array($siteNotify->cntct_from_addr => $siteNotify->cntct_from_name)); $m1->setTo(array()); $m1->setBcc($siteNotify->cntct_bcc_array); $m1->setPriority(3) ; // set the priority to Low $transport = Swift_SmtpTransport::newInstance($notifySrvr->server_uri, $notifySrvr->server_port, $notifySrvr->server_ssl); $transport->setUsername($notifySrvr->login_usr); $transport->setPassword($notifySrvr->login_pwd); $mailer = Swift_Mailer::newInstance($transport); if ( $mailer->send($m1) ) { $errorMessage = "

OK !

$xname, thank you for the inquiry.
I'll contact you as soon as possible.

"; } else { $errorMessage = "

Error !

An unknown error occured.

Please try again later, or send your enquiry by email, to milenko@prvacki.com

"; } $name = $email = $phone = $msg = NULL; } ?> Contact