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
13 hours 28 min ago
16 hours 23 min ago
17 hours 37 min ago
19 hours 55 sec ago
20 hours 38 min ago
22 hours 7 min ago
23 hours 21 min ago
1 day 15 hours ago
1 day 16 hours ago
1 day 19 hours ago