Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hi,
I am relatively new to php. I wrote a little script to send me html form data. See below. It was working fine until I switched my hoster. I contacted my hoster and they told me that they removed their server as trusted relays, so now all mail sending codes/scripts have to be properly authenticated using a valid "FROM" e-mail address, "USERNAME", and "PASSWORD" of an account currently on their mail netowrk.
I have tried multiple things to no avail. Can anyone please tell me what I need to add to this script to do what they are asking??
Thank you for your time.Code: Select all
<?
$email = $_REQUEST['email'] ;
$name = $_REQUEST['name'] ;
$agentemail = $_REQUEST['agentemail'] ;
$body = $_REQUEST['body'] ;
$msg = "\nThis message was sent to you by $name\n\n";
$msg .= "Their E-Mail is $email\n\n";
$msg .= "$body\n\n";
mail( "$agentemail", "$name would like your help selecting headshots.",
$msg, "From: $email" );
header( "Location: headshot.shtml" );
?>feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]