View previous topic :: View next topic |
Author |
Message |
jasper Guest
|
Posted: Sun Jul 28, 2002 1:30 am Post subject: email with ( php ) wich i have ( added ) to the ( server ). |
|
|
<?php
$PageTitle = "Sending Emails";
require ("header.php");
if ($BeenSubmitted) {
if ($MailTo) {
if (mail($MailTo, $Subject, $Body, "From: $MailFrom")) {
print ("<B><CENTER><FONT COLOR=BLUE>Your email has been successfully sent!</FONT></CENTER></B>\n");
} else {
print ("<B><CENTER><FONT COLOR=RED>Your email was not successfully sent due to a system error!</FONT></CENTER></B>\n");
}
} else {
print ("<B><CENTER><FONT COLOR=RED>Please enter the recipient's mail to address!</FONT></CENTER></B>\n");
}
}
?>
<FORM ACTION="email.php" METHOD=POST>
Recipient's Email Address: <INPUT TYPE=TEXT NAME="MailTo" SIZE="50"><BR>
Your Email Address: <INPUT TYPE=TEXT NAME="MailFrom" SIZE="50"><BR>
Email Subject: <INPUT TYPE=TEXT NAME="Subject" SIZE="80"><BR>
Email Body:<TEXTAREA NAME="Body" ROWS="10" COLS="50"></TEXTAREA><P>
<INPUT TYPE=HIDDEN NAME=BeenSubmitted VALUE=TRUE>
<INPUT TYPE=SUBMIT NAME="SUBMIT" VALUE="Submit!">
</FORM>
<?php
require ("footer.php");
?>
what am i doing wrong ?? why doesn't this work with the php module i added to the server . Do i need something else ? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Jul 28, 2002 2:52 pm Post subject: Re: email with ( php ) wich i have ( added ) to the ( server |
|
|
You should configure PHP to tell him how to send the mail. Edit php.ini file (it should be in your windows directory) and locate the following lines
Code: |
[mail function]
; For Win32 only.
SMTP = localhost ; for Win32 only
|
Then change localhost with the SMTP server you use (the same server you use in your email program configuration).
All should work fine now. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
jasper Guest
|
Posted: Mon Jul 29, 2002 2:29 pm Post subject: thnx |
|
|
thnx a lot !!! it works just fine .
greetings ,
jasper |
|
Back to top |
|
|
gengar56 -
Joined: 02 Aug 2002 Posts: 15
|
Posted: Fri Aug 02, 2002 10:35 pm Post subject: |
|
|
Will that still work if my STMP server requires authentication? _________________ New user of Abyss Web Server |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Aug 03, 2002 12:19 am Post subject: |
|
|
gengar56 wrote: | Will that still work if my STMP server requires authentication? |
This was just a workaround. Formore information, please read the official PHP documentation. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
|