64) { // local part length exceeded $isValid = false; } else if ($domainLen < 1 || $domainLen > 255) { // domain part length exceeded $isValid = false; } else if ($local[0] == '.' || $local[$localLen-1] == '.') { // local part starts or ends with '.' $isValid = false; } else if (preg_match('/\\.\\./', $local)) { // local part has two consecutive dots $isValid = false; } else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain)) { // character not valid in domain part $isValid = false; } else if (preg_match('/\\.\\./', $domain)) { // domain part has two consecutive dots $isValid = false; } else if (!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/', str_replace("\\\\","",$local))) { // character not valid in local part unless // local part is quoted if (!preg_match('/^"(\\\\"|[^"])+"$/', str_replace("\\\\","",$local))) { $isValid = false; } } if ($isValid && !(checkdnsrr($domain,"MX") || checkdnsrr($domain,"A"))) { // domain not found in DNS $isValid = false; } } return $isValid; } if ((isset($_GET['submit'])) && ((!isset($_POST['email'])) || (!isset($_POST['agree'])) || (!isset($_POST['first'])) || (!isset($_POST['last'])) || (!isset($_POST['phone'])) || (!isset($_POST['position'])) || (!isset($_POST['company'])) || (!isset($_POST['country'])))) { echo "

Error: Please fill in your details, check 'Please subscribe' and resubmit.

"; } else {} if ((isset($_POST['email'])) && (isset($_POST['agree'])) && (isset($_POST['first'])) && (isset($_POST['last'])) && (isset($_POST['phone'])) && (isset($_POST['position'])) && (isset($_POST['company'])) && (isset($_POST['country']))) { if (validEmail($_POST['email'])) { $email = $_POST['email']; $first = $_POST['first']; $last = $_POST['last']; $phone = $_POST['phone']; $position = $_POST['position']; $company = $_POST['company']; $country = $_POST['country']; //$to = 'gviolaris@idealhost.gr'; $to = 'Mikaela.Kleanthous@axiavg.com, it@axiavg.com, constantinos.zouzoulas@axiavg.com,Robert.perri@axiacm.com, Michelle.Tsiamai@Axiavg.com, Argyrios.Gkonis@axiavg.com'; $subject = "WEEKLY NOTE: SHIPPING"; $message = " Hello, I'd like my email address ".$email." to be subscribed to Axia's Shipping Weekly Note mailing list First Name: ".$first." Last Name: ".$last." Phone Number: ".$phone." Position: ".$position." Company: ".$company." Country: ".$country." "; $from = $email; $headers = "MIME-Version: 1.0rn"; $headers .= "Content-type: text/html; charset=iso-8859-1rn"; $headers .= "From: ".$from."\r\n"; mail($to,$subject,$message,$headers); echo "

You have successfully subscribed.

"; } else {echo "

Error: Please fill in your details, and resubmit.

"; ?>
* First Name:
* Last Name:
* Email:
* Phone:
* Position:
* Company:
* Country:
Please subscribe me to AXIA's Shipping Weekly Note mailing list.
* First Name:
* Last Name:
* Email:
* Phone:
* Position:
* Company:
* Country:
Please subscribe me to AXIA's Shipping Weekly Note mailing list.