Email not sending


could please. having problem receiving emails through xampp/localhost. have built form , when fill in message tells me mail has been sent. not error messesages.

 

i have attached php page code , php.ini fail function xampp

 

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr...ransitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>contact me</title>
</head>
<body>
<h1>contact me</h1>
<?php # script 10.1 - email.php
// check form submission:
if (isset($_post['submitted'])) {

// minimal form validation
if (!empty($_post['name']) && !empty($_post['email']) && !empty($_post['comments']) ) {
  
   // create body:
   $body = "name: {$_post['name']}\n\ncomments: {$_post['comments']}";
  
   // make no longer 70 caracters long:
   $body = wordwrap($body, 70);
  
   // send mail:
   mail('paul@wcrltd.co.uk', 'contact form submission', $body, "from {$_post['email']}");
  
   // print message:
   echo '<p><em>thank contacting me. reply day.</em></p>';
  
   // clear $_post (so forms not sticky):
   $_post = array();
  
} else {
   echo '<p style="font-weight: bold; color: #c00">please fill out form completley.</p>';
}

} // end of main isset() if.
// create html form
?>
<p>please fill out form contact me.</p>
<form action="email.php" method="post">
<p>name: <input type="text" name="name" size="30" maxlengh="60" value="<?php if (isset($_post['name'])) echo $_post['email']; ?>" /></p>
<p>email address: <input type="text" name="email" size="30" maxlengh="80" value="<?php if (isset($_post['email'])) echo $_post['email']; ?>" /></p>
<p>comments: <textarea name="comments" rows="5" cols="30"><?php if (isset($_post['comments'])) echo $_post['comments']; ?> </textarea></p> 
<p><input type="submit" name="submit" value="send!" /></p>
<input type="hidden" name="submitted" value="true" />
</form>
</body>
</html>

 

 

 

[mail function]
xampp: comment out if want work smtp server mercury
smtp = mail.wcrltd.co.uk
smtp_port = 25

win32 only.
http://php.net/sendmail-from
sendmail_from = paul@wcrltd.co.uk

; xampp important note (1): if xampp installed in base directory spaces (e.g. c:\program filesc:\xampp) fakemail , mailtodisk not work correctly.
; xampp important note (2): in case please copy sendmail or mailtodisk folder in root folder (e.g. c:\sendmail) , use sendmail_path. 

; xampp: comment out if want work fakemail forwarding mailbox (sendmail.exe in sendmail folder)
;sendmail_path = "\"c:\xampp\sendmail\sendmail.exe\" -t"

; xampp: comment out if want work mailtodisk, writes mails in c:\xampp\mailoutput folder
sendmail_path = "c:\xampp\mailtodisk\mailtodisk.exe"

; force addition of specified parameters passed parameters
; sendmail binary. these parameters replace value of
; 5th parameter mail(), in safe mode.
;mail.force_extra_parameters =

; add x-php-originating-script: include uid of script followed filename
mail.add_x_header = off

; log mail() calls including full path of script, line #, address , headers
;mail.log = "c:\xampp\php\logs\php_mail.log"

[sql]
; http://php.net/sql.safe-mode
sql.safe_mode = off

peterattrsb wrote:

 

could please. having problem receiving emails through xampp/localhost. have built form , when fill in message tells me mail has been sent. not error messesages.

 

 

why need work through xampp/localhost?

 

it works on remote, right?



More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support