ultratek Posted September 30, 2008 Share Posted September 30, 2008 I was wondering how i look up the ini_set of my hosting provider for my mail process form? example:ini_set("SMTP","bosmail.nt.com"); the above line was gave to me...but i need to be able to find this on my own. Link to comment https://forums.phpfreaks.com/topic/126451-formmail-ini_set/ Share on other sites More sharing options...
JonnoTheDev Posted September 30, 2008 Share Posted September 30, 2008 Try using the server IP address or the IP that your domain name resolves to. Link to comment https://forums.phpfreaks.com/topic/126451-formmail-ini_set/#findComment-653824 Share on other sites More sharing options...
ultratek Posted September 30, 2008 Author Share Posted September 30, 2008 thanks i will try that. Link to comment https://forums.phpfreaks.com/topic/126451-formmail-ini_set/#findComment-653837 Share on other sites More sharing options...
trq Posted September 30, 2008 Share Posted September 30, 2008 ini_get(). Link to comment https://forums.phpfreaks.com/topic/126451-formmail-ini_set/#findComment-653838 Share on other sites More sharing options...
ultratek Posted September 30, 2008 Author Share Posted September 30, 2008 how would i query with ini_get()...to get the information for: ini_set('sendmail_from', '[email protected]); Link to comment https://forums.phpfreaks.com/topic/126451-formmail-ini_set/#findComment-653858 Share on other sites More sharing options...
trq Posted September 30, 2008 Share Posted September 30, 2008 ini_get will retrieve settings. eg; <?php echo ini_get('SMTP'); ?> Is that what your after? Link to comment https://forums.phpfreaks.com/topic/126451-formmail-ini_set/#findComment-653881 Share on other sites More sharing options...
ultratek Posted September 30, 2008 Author Share Posted September 30, 2008 yes...thankyou... i tried the address the ini_get came back with and i get this: PHP Warning: mail() [function.mail]: SMTP server response: 501 Incorrect Address Format in C:\Websites\efficaciousplanet368\justinvenablephoto.com\handle_form.php on line 27 here is the code: <?php ini_set("SMTP","smtp1.easycgi.com"); $name = $_POST['name']; $phone = $_POST['email']; $email = $_POST['phone']; $subject = $_POST['subject']; $comments = $_POST['comments']; $name = $name; //senders name $email = $email; //senders e-mail adress $recipient = "[email protected]"; //recipient //$recipient = "[email protected]"; //recipient //$recipient = "[email protected]"; //recipient $comments = "$comments...\n\n".$phone; $subject = $subject; //subject $header = "From: ". $name . " <" . $email . ">\r\n"; //optional headerfields mail($recipient, $subject, $comments, $header); //mail command ?> Link to comment https://forums.phpfreaks.com/topic/126451-formmail-ini_set/#findComment-653951 Share on other sites More sharing options...
trq Posted September 30, 2008 Share Posted September 30, 2008 If ini_get is already returning that same address there is no need to try and set it again using ini_set, its already set. Your FROM header needs to be a valid email address, not a name. Link to comment https://forums.phpfreaks.com/topic/126451-formmail-ini_set/#findComment-653971 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.