Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is a MTA and where can I get it?
#1
I wrote this hoping to send email from it. However upon completion, I learned I need something called an MTA (Mail transfer agent). Can someone provide me with a link to a good one and how to set it up? Please don't respond Google it. Yes, I can google it. And yes I will get plenty of responses. However I want your opinion on a good one that is easy to set up.
NOTE: If what I'm asking doesn't make any sense, sorry. I don't really know much of what an MTA is.

PHP Code:
<html>
<
body>
<
form action="mail.php" method="get">
To: <input type="text" name="to" /><br>
From: <input type="text" name="from" /><br>
Subject: <input type="text" name="from" /><br>
Message: <br>
<
textarea rows="5" cols="20" name="message" wrap="physical"></textarea><br>
<
input type="submit" value="Send!">
</
form>
<?
php
$to
=$_GET["to"];
$from=$_GET["from"];
$subject=$_GET["subject"];
$message=$_GET["message"];
mail($to,$subject,$message);
?>
</body>
</html> 
Reply
#2
Well MTA is used for/with mail headers...
So here is th source http://php.net/manual/en/function.mail.php

Take a look, here!
Iguess you're using nix!

edit: Sorry IDK much about it, needed to google a bit... Never had that problem! Sad
Reply
#3
(12-21-2009, 02:26 AM)Master of The Universe Wrote: Well MTA is used for/with mail headers...
So here is th source http://php.net/manual/en/function.mail.php

Take a look, here!
Iguess you're using nix!

edit: Sorry IDK much about it, needed to google a bit... Never had that problem! Sad

Thanks. I got all that stuff installed, however it still isn't working. Do you see anything wrong with my code?
Reply
#4
NO not really only that you didn't sent $from with the mail() function, but I don't thinkt that should be a problem...
But sorry I never had the same problem, it does look like it should be included in PHP.... So IDK :'(
Reply
#5
Ok, I think I can just run it on my windows computer.
EDIT: or maybe I can try hosting it, that may work
Reply
#6
Ohh wait that might work.... If you didn't setup your smtp settings the mail function doesn't work on localhosts.
Try uploading it somewhere I bet it will work!
Reply
#7
Yay! Hosting it worked.
Reply
#8
I'm sorry this could get faster done, if I would used my brain...
You should save a function for mail sending and add it to your projects when you upload them, I've never tested mail() localy and that's why I didn't know about the problem..
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)