Set up SMTP
Moderator: General Moderators
Set up SMTP
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?
-
Cruzado_Mainfrm
- Forum Contributor
- Posts: 346
- Joined: Sun Jun 15, 2003 11:22 pm
- Location: Miami, FL
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:
Mail.php
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
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>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);
?>-
Cruzado_Mainfrm
- Forum Contributor
- Posts: 346
- Joined: Sun Jun 15, 2003 11:22 pm
- Location: Miami, FL
-
Cruzado_Mainfrm
- Forum Contributor
- Posts: 346
- Joined: Sun Jun 15, 2003 11:22 pm
- Location: Miami, FL
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
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.
; 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.