Forum Moderators: coopster
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$to = "mail@example.com";
$name = $_POST['name'];
$acct = $_POST['acct'];
$street1 = $_POST['street1'];
$phone = $_POST['phone'];
$street2 = $_POST['street2'];
$fax = $_POST['fax'];
$town = $_POST['town'];
$email = $_POST['email'];
$ount = $_POST['ount'];
$person = $_POST['person'];
$zipper = $_POST['zipper'];
$ordnu = $_POST['ordnu'];
$q1 = $_POST['q1'];
$q2 = $_POST['q2'];
$q3 = $_POST['q3'];
$q4 = $_POST['q4'];
$voice = $_POST['voice'];
$subject = "Message From $name";
$message = "Name: $name\nAccount: $acct\nStreet1: $street1\nStreet2: $street2\nTown: $town\nCountry: $ount\nPost Code: $zipper\nPhone: $phone\nFax: $fax\nE-mail: $email\nOrder Number: $ordnu\nPerson: $person\nInvoice: $voice\nTut Pack: $q1\nTut Split: $q2\nEmperor Pack: $q3\nEmperor Split: $q4";
mail($to, $subject, $message, "From: $name <$email>\nX-Mailer: PHP/" . phpversion());
header( "location: redir.html" );
?>
Are you saying that the script works fine if you email to somebody within your office, but if you try to use the very same script on the very same server with an "outside" email address it is failing? You may have to offer some more details on the process, not the code, that looks simple enough, but the steps being taken ...