Albatross Posted February 22, 2007 Share Posted February 22, 2007 Mornin all! I have a html form application that gets processed by some php code, returns a result page to the applicant, stores the info in a db, and emails myself and another person. The problem I have is that when I get the email, I see the domain server email addy, not the registered domain. (ex : [email protected] instead of [email protected]) (both are techincally correct but I want my paid domain used....not the default webhost domain. Based on the code below, is there a way I can change it so that I get the domain that I want? $inputfield00=@($_POST['name']); $inputfield01=@($_POST['history']); $inputfield02=@($_POST['recruiting']); $inputfield03=@($_POST['email']); $inputfield04=@($_POST['im']); $inputfield05=@($_POST['charname']); $inputfield06=@($_POST['charage']); $inputfield07=@($_POST['bio']); $inputfield08=@($_POST['strengths']); $inputfield09=@($_POST['whatship']); $inputfield10=@($_POST['responsibilities']); $inputfield11=@($_POST['sample']); $mailto="[email protected]"; $mysubject="Application for '$_POST[name]'."; $mail = 'An application requires your review.: Message: '.$message.' Field 1: '.$inputfield00.' Field 2: '.$inputfield01.' Field 3'.$inputfield02.' Field 4 '.$inputfield03.' Field 5 '.$inputfield04.' Field 6'.$inputfield05.' Field 7'.$inputfield06.' Field 8'.$inputfield07.' Field 9'.$inputfield08.' Field 10'.$inputfield09.' Field 11'.$inputfield010.' Field 12'.$inputfield11; $header .= "Application"; mail($mailto, $mysubject, $mail, $header); ?> (This is all of the mailer code.) Link to comment https://forums.phpfreaks.com/topic/39592-solved-email-from-form-issue/ Share on other sites More sharing options...
Jessica Posted February 22, 2007 Share Posted February 22, 2007 $header = 'From: Bob <[email protected]>'; Link to comment https://forums.phpfreaks.com/topic/39592-solved-email-from-form-issue/#findComment-191049 Share on other sites More sharing options...
heckenschutze Posted February 22, 2007 Share Posted February 22, 2007 whats with the overuse of the error supressing operator!?!!? Link to comment https://forums.phpfreaks.com/topic/39592-solved-email-from-form-issue/#findComment-191060 Share on other sites More sharing options...
Albatross Posted February 22, 2007 Author Share Posted February 22, 2007 To be honest, it's what I started with way back when and it worked......so I kept using it. If you know of a better, cleaner way, I am truly all ears. (Copy/pasting the same code across sheets is a pain in the backside....believe me) Link to comment https://forums.phpfreaks.com/topic/39592-solved-email-from-form-issue/#findComment-191077 Share on other sites More sharing options...
heckenschutze Posted February 22, 2007 Share Posted February 22, 2007 well for example: $inputfield00 = ((array_key_exists('name', $_POST)) ? $_POST['name'] : "my default value"); *nb: parenthesis added for ease of reading Link to comment https://forums.phpfreaks.com/topic/39592-solved-email-from-form-issue/#findComment-191102 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.