Help with MAIL

Hi all.

I’m new to the forum and novice to PHP. I’m facing a strange problem… at least strange to me :slight_smile:
I’m trying to make a contact form which is working perfectly but the message won’t be delivered if the recipient is an email alias and not a real address.

Do you think the problem is about my script or the server configuration?

Thanx in advance :slight_smile:

[php]

<?php $ip = $_POST['ip']; $httpref = $_POST['httpref']; $httpagent = $_POST['httpagent']; $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $email = $_POST['email']; $phone = $_POST['phone']; $thesubject = $_POST['thesubject']; $themessage = $_POST['themessage']; $todayis = date("l, F j, Y, G:i a") ; $subject = "Contact Form"; $message = ""; $message .= ""; $message .= ""; $message .= ""; $message .= ""; $message .= ""; $message .= ""; $message .= ""; $message .= ""; $message .= ""; $message .= "
Firstname $firstname
Lastname $lastname
Email $email
Phone number $phone
Subject $thesubject
Message $themessage
 
Timestamp $todayis
Senders IP address $ip
"; $to = "Main Recipient "; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $headers .= 'To: Main Recipient ' . "\r\n"; $headers .= 'From: Main Recipient ' . "\r\n"; $headers .= 'Cc: Secondary Recipient ' . "\r\n"; $headers .= 'Bcc: Secret Recipient ' . "\r\n"; mail($to, $subject, $message, $headers); ?>

[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service