nphls Posted June 9, 2006 Share Posted June 9, 2006 Hi.I'd like to know how can i set the SMTP server when sending mails through mail()function.Do you know how i can do that? If you do, plz let me no.I have the following code if it helps:[code]<?php$to = '[email protected]'; $from = $_POST['email']; $subject = $_POST['msg']; $confirm = 'confirm.php';$error = 'mailerror.php';// Don't touch anything else //$mailheader = "From: $from";$mailheader .= "Reply-To: $from";if (isset($HTTP_POST_VARS)){ $mailbody = ''; while (list($key, $value) = each($HTTP_POST_VARS)) { $mailbody .= $key . ' = ' . $value . "rn"; } } $mailforms = mail($to, $subject, $mailbody, $mailheader); if($mailforms) { include("$confirm");} else { include("$error");}?>[/code] Link to comment https://forums.phpfreaks.com/topic/11623-help-with-an-email-form-plz/ Share on other sites More sharing options...
nphls Posted June 10, 2006 Author Share Posted June 10, 2006 Can anyone give me a hand?I'd really pareciate your help Link to comment https://forums.phpfreaks.com/topic/11623-help-with-an-email-form-plz/#findComment-43981 Share on other sites More sharing options...
yonta Posted June 10, 2006 Share Posted June 10, 2006 To the best of my knowledge you don't have to set up anything. The mail() function should just work in a php environment. Link to comment https://forums.phpfreaks.com/topic/11623-help-with-an-email-form-plz/#findComment-43986 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.