Jump to content

PHP Secure Mail Script Help


Brad7928

Recommended Posts

I'm after a php script that:

 

- Has a form that i can put into a .html page that calls the script,

- Is able to tell a smpt server that it is USER: xxxx with a PASS: xxxx

 

I have set up my mail server to not allow relaying, so when i use other mailing scripts, my SMTP server gets it but won't forward it on because no user/mail from was specified.

 

Can anyone help me out? Or is this relating to a setting in my php.ini file? i think i can remember one being in there relating to this...

 

This is the script i have at the moment:

 

 

<?php

// Contact subject
$subject ="$subject"; 
// Details
$message="$detail"; 

// Mail of sender
$mail_from="$customer_mail"; 
// From 
$header="from: $name <$mail_from>"; 

// Enter your email address
$to ='[email protected]'; 

$send_contact=mail($to,$subject,$message,$header, "From: [email protected]");

// Check, if message sent to your email 
// display message "Thanks for the message!"
if($send_contact){
header("Location: contact_success.html");
}
else {
echo "ERROR";
}
?>

 

Any Idea's?  ???

Link to comment
https://forums.phpfreaks.com/topic/143717-php-secure-mail-script-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.