Email ?
Posted: Fri Mar 18, 2005 3:46 am
Hi
I am having problems sending this email using a very basic form. I have configured the php.ini file to reflect the correct smtp server but I keep getting a error in line 9 of my .php script? Am I missing a header?
Please can somebody double check my script & configuration data to see if there are any errors.
Thanks
feyd | Please use
I am having problems sending this email using a very basic form. I have configured the php.ini file to reflect the correct smtp server but I keep getting a error in line 9 of my .php script? Am I missing a header?
Please can somebody double check my script & configuration data to see if there are any errors.
Thanks
Code: Select all
їmail function]
; For Win32 only.
SMTP = 127.26.1.2
smtp_port = 25
; For Win32 only.
sendmail_from = enquiries@midastelecom.wsCode: Select all
їFri Mar 18 08:32:11 2005] їerror] PHP Warning: mail() ї<a href='function.mail'>function.mail</a>]: &quot;sendmail_from&quot; not set in php.ini or custom &quot;From:&quot; header missing in c:\\Apache\\htdocs\\feedback.php on line 9Code: Select all
<html>
<head> <title>Feedback Form</title> </head>
<body>
<form action="e;feedback.php"e; method="e;post"e;>
Name:<input type="e;text"e; name="e;username"e; size="e;30"e;>
<br> <br>
Email:<input type="e;text"e; name="e;useraddr"e; size="e;30"e;>
<br> <br>
<textarea name="e;comments"e; cols="e;30"e; rows="e;5"e;>
</textarea><br>
<input type="e;submit"e; value="e;Send Form"e;>
</form>
</body>
</html>Code: Select all
<?php
$username = $_POSTї'username'];
$useraddr = $_POSTї'useraddr'];
$comments = $_POSTї'comments'];
$to = "e;enquiries@midastelecom.ws"e;;
$re = "e;Website Feedback"e;;
$msg = $comments;
mail( $to, $re, $msg );
?>
<html>
<head><title>Message Received</title></head>
<body>
<h1>Thanks for your comments</h1>
Message received from <?php echo( $username ); ?>
<br>
Reply to <?php echo( $useraddr ); ?>
</body>
</html>feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]