Page 1 of 1

Set up SMTP

Posted: Thu Oct 30, 2003 7:29 pm
by renaxgade
How do I set up my smtp server? I have apache 2 and php installed and they work, but when I try to use mail () to send a message, that im sure should work, it doesnt send, and I never configured any files, so Im guessing thats it. How do I do it?

Posted: Thu Oct 30, 2003 8:06 pm
by Gen-ik
As far as I know you need to install a mail server as well so that your computer is running as a POP3 and/or SMPT server.

Try searching Yahoo or Google.

Posted: Thu Oct 30, 2003 8:24 pm
by Cruzado_Mainfrm
if u have win9x/2k/xp u can install IIS and set up the SMTP server it has
if u have unix u can use an app called Qmail i think... or something like that(i've never used unix)

after u set up the smtp server, u have to configure the php.ini file and set there the smtp directives...

Posted: Thu Oct 30, 2003 9:18 pm
by renaxgade
This is Linux, and I have sendmail installed and turned on. But when I try to send an e-mail through a form that looks like this:

Code: Select all

<form method="POST" action="Mail.php>
Name: <input type="text" name="name"><br>
Screen Name <input type="text" name="sn"><br>
<input type="submit" value="submit"></form>
Mail.php

Code: Select all

<?php
$to = "Joey<**@*****.net>";
$subject = "Icon Form";
$body = $name + "\n\r" + $sn;
$from = "From: Joey<Website@come.com>\n";
$headers = $from;
mail($to, $subject, $body, $headers);


?>
Now I have no idea if my smtp server or however the mail is set up to go out of works. I don't really know what im doing, but I started sendmail in my init.d directory. Do I have to do anything in httpd.conf or php.ini

Posted: Thu Oct 30, 2003 9:29 pm
by Cruzado_Mainfrm
try changing:
to = "Joey<**@*****.net>";

to

to = "**@*****.net";

and test it

Posted: Thu Oct 30, 2003 9:34 pm
by renaxgade
Nope. Are you sure there isnt anything in any configuration files I have to edit?

Posted: Thu Oct 30, 2003 10:21 pm
by Cruzado_Mainfrm
did u configure your php.ini file to work with your smtp server?

Posted: Fri Oct 31, 2003 3:17 am
by twigletmac
Did you put your sendmail path in the php.ini?

Mac

Posted: Fri Oct 31, 2003 5:22 am
by renaxgade
I don't think so. How do I?

Posted: Fri Oct 31, 2003 5:40 am
by renaxgade
I think I did, or it was automatic, because It says this in php.ini:
; For Unix only. You may supply arguments as well. (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail - t -i

Now I looked in that folder and saw sendmail. Maybe sendmail isn't working for soem reason? It's turned on. Or it still could be a problem with the script.

Posted: Fri Oct 31, 2003 12:39 pm
by renaxgade
BUMP. Anyone have any ideas, Im stumped!