Jump to content

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 ='Brad@forum-indoor.info'; 

$send_contact=mail($to,$subject,$message,$header, "From: Brad@forum-indoor.info");

// 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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.