Forums
This topic is locked
contact form with php script
Posted 05 May 2006 13:49:21
1
has voted
05 May 2006 13:49:21 martin latham posted:
I am using a flash contact form with a php script. I am new to this so please excuse the request. The code I am using has to be used with SMTP. I dont have this with my account only POP. Someone has told me that I can change the command so it will work without SMTP.I have posted the code below.
<?
$to = " ";
$msg = "$name\n\n";
$msg .= "$message\n\n";
mail($to, $subject, $msg, "From: My web site\nReply-To: $email\n"
?>
If it is possable, Whats the command and where do I put it.
Any help with be good. Thanks in advance
Martin
Replies
Replied 05 May 2006 14:47:25
05 May 2006 14:47:25 Roddy Dairion replied:
The code that u wrote should work fine.
All you need is to set in your php.ini file the smtp host in your php.ini file there's something called SMTP = localhost change localhost to the smtp relay u want to use for e.g. smtp.urmail.com.
All you need is to set in your php.ini file the smtp host in your php.ini file there's something called SMTP = localhost change localhost to the smtp relay u want to use for e.g. smtp.urmail.com.
Replied 05 May 2006 16:01:20
05 May 2006 16:01:20 martin latham replied:
Thanks Roddy. I dont have a php.ini file. I know that the website host hast one but they will not let me edit it. Is there another way of doing it?
Thanks
Martin
Thanks
Martin
Replied 05 May 2006 16:30:41
05 May 2006 16:30:41 Roddy Dairion replied:
put this before your mail() function in your page
<pre id=code><font face=courier size=2 id=code>ini_set(SMPT,"smtp.urmail.com" </font id=code></pre id=code>
and at the end put this
<pre id=code><font face=courier size=2 id=code>ini_restore("SMTP"</font id=code></pre id=code>
<pre id=code><font face=courier size=2 id=code>ini_set(SMPT,"smtp.urmail.com" </font id=code></pre id=code>
and at the end put this
<pre id=code><font face=courier size=2 id=code>ini_restore("SMTP"</font id=code></pre id=code>
Replied 05 May 2006 16:45:50
05 May 2006 16:45:50 martin latham replied:
thanks again.
I will try that
martin
I will try that
martin