[thelist] Setting up a mail server (qmail) - or do I even have to?

Jay Fitzgerald jayfitz at bayou.com
Fri Jan 12 16:53:35 CST 2001


as far as setting up a mail server - i'm not sure...but for the php mail script,
i do know that the server where the script will reside must be running some sort
of sendmail type program....below is the script i just completed for the purpose
of a feedback form:


<?

 if (($from == "") || ($Comments ==  "")) {
  header( "Location: http://www.foo.com/error.html");
  exit;
 }

 $msg = "Full Name:\t$from\n";
 $msg .= "E-Mail Address:\t$email\n";
 $msg .= "Comments:\t$Comments\n\n";

 $mailheaders = "From: Feedback Form\n";
 $mailheaders .= "Reply-To: $from\n\n";

 $mail("jayfitz at bayou.com", "Feedback", $msg, $mailheaders);

 echo "<BODY BGCOLOR=#999999 TEXT=#000000 TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0
MARGINHEIGHT=0>";
 echo "<FONT FACE=Arial, Helvetica SIZE=+2>Thank You, $from</FONT><BR>";
 echo "<FONT FACE=Arial, Helvetica SIZE=+1>Stay tuned for more of my PHP
Scripts</FONT>";

?>


HTH

Jay

Jason Lustig wrote:

> OK... I use PHP (and NO, this is _not_ a PHP-specific question), and the way
> you send mail in PHP through the script is using the mail() function. I'm
> trying to get it to work for me, but whenever I try to send mail (the key
> word is "try"), I get an error like this:
>
> "Cannot connect to thisemail at thisdomain.com"
>
> I asked the people at phpbuilder.com's forums, and they told me to set up a
> mail server, and pointed me to qmail. My own university uses qmail for its
> very large email system, so I am guessing it is pretty good. Anyway, I'm
> building & testing my application (a message board system) on a
> win98-Apache-PHP 4.03 system - and I have no idea how to set this up, or if
> I even have to. I don't have the energy or bandwith to download Unix or
> Linux, so I'm pretty much stuck with microsoft's buggy products for the time
> being. Do I have to set up a mail server?
>
> If yes, how would I go about doing that? I'm having problems with my
> downloaded version of qmail, and I don't want to mess anything up. The
> documentation that I was looking at on the internet wasn't too helpful for
> windows... if you could point me somewhere where there's an article or
> documentation, that would be nice. :)
>
> If not, perhaps you could explain what might be going wrong. My line of code
> is:
>
> mail("$email","subject","message");
>
> where, obviously, $email is the person's email to send it to. Do I have to
> do something before the mail() function that I'm not doing? It's not making
> any sense to me. And PHP isn't giving me parse errors.
>
> The idea that I need a mail server makes sense, but I don't know how to set
> it up. Any help here would be greatly accepted. Thanks in advance for
> anything, anything at all.
>
> --Jason
>
> http://www.alternate-universe.org/
>
> *****
>
> Your signiture determines your reality
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !

--
Jay Fitzgerald - Web Development/Sales
=============================================
Bayou Internet                                             http://www.bayou.com
Mississippi Internet                                  http://www.mississippi.net

Vicksburg Online                                    http://www.vicksburg.com
Bama Online                                          http://www.bamaonline.net
=============================================
ICQ: 38823829      Phone: 888-302-2968       Fax: 877-329-2296






More information about the thelist mailing list