email with ( php ) wich i have ( added ) to the ( server ).

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
jasper
Guest





PostPosted: Sun Jul 28, 2002 1:30 am    Post subject: email with ( php ) wich i have ( added ) to the ( server ). Reply with quote

<?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

PostPosted: Sun Jul 28, 2002 2:52 pm    Post subject: Re: email with ( php ) wich i have ( added ) to the ( server Reply with quote

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 View user's profile Send private message Send e-mail
jasper
Guest





PostPosted: Mon Jul 29, 2002 2:29 pm    Post subject: thnx Reply with quote

thnx a lot !!! it works just fine .

greetings ,

jasper
Back to top
gengar56
-


Joined: 02 Aug 2002
Posts: 15

PostPosted: Fri Aug 02, 2002 10:35 pm    Post subject: Reply with quote

Will that still work if my STMP server requires authentication?
_________________
New user of Abyss Web Server
Back to top View user's profile Send private message Send e-mail AIM Address
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Aug 03, 2002 12:19 am    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group