(04-12-2016, 12:33 AM)Me.B Wrote: can you check postfix queue to see where the file ended?
Also sending email that way can cause issues. As the sender may some time authorize few smtp servers to send on his behalf using SPF. Best is setting FROM as sever@domain.com.
M B
I'll check the postfix queue here in a sec. I've changed the php to the below quoted code, but still no dice.
Code:
<?php
if(isset($_POST['submit'])){
$to = "email@domain.com (not hosted on same server)";
$to2 = $_POST['email'];
$from = "email@domain.com (hosted on same server)";
$name = $_POST['name'];
$email = $_POST['email'];
$telephone = $_POST['telephone'];
$contactmethod = $_POST['contactmethod'];
$subject = "Form submission";
$subject2 = "Copy of your form submission";
$message = $name . " wrote the following:" . "\n\n" . $_POST['message'];
$message2 = "Here is a copy of your message " . $name . "\n\n" . $_POST['message'];
$headers = "From:" . $from;
$headers2 = "From:" . $to;
mail($to,$subject,$message,$telephone,$email, $contactmethod,$headers);
mail($to2,$subject2,$message2);
echo "Mail Sent. Thank you " . $name . ", we will contact you shortly.";
}
?>