I wonder if anyone can help?
I have created a test page with the following code:
Code:
<?php
function send_email($from, $to, $cc, $bcc, $subject, $message){
$headers = "From: ".$from."\r\n";
$headers .= "Reply-To: ".$from."\r\n";
$headers .= "Return-Path: ".$from."\r\n";
$headers .= "CC: ".$cc."\r\n";
$headers .= "BCC: ".$to."\r\n";
if (mail($to,$subject,$message,$headers) ) {
echo "email sent";
} else {
echo "email could not be sent";
}
}
$subject = "Hello!";
$message = "Hello! How are you today?";
send_email("website@mydomain.net", "testadd1@domain.com",
"testadd2@domain.com", "hidden_email@domain.com",
$subject ,
$message);
?>
When I view the page above I get 'email sent' but no mail is received. If I run the command
I get
Quote:
|
postsuper: Deleted: 4 messages
|
so it looks to me like the messages are going into the queue? Do I have to specify my ISP's smtp relay server anywhere in the postfix config?
Kind regards,
Tom
Edit, also if I view the mail queue on Ispconfig 3 after running the test script above it shows:
Data from: 2009-07-29 16:15
/var/spool/mqueue is empty
Total requests: 0
Is this a different queue?
Recent comments
1 day 2 hours ago
1 day 9 hours ago
1 day 13 hours ago
1 day 14 hours ago
1 day 23 hours ago
2 days 8 hours ago
2 days 9 hours ago
2 days 13 hours ago
2 days 17 hours ago
2 days 17 hours ago