Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 11th, 2006, 12:22 PM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with sending e-mail

Hi ,
i use the following php code to send mail :
<?php
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
  echo("<p>Message successfully sent!</p>");
 } else {
  echo("<p>Message delivery failed...</p>");
 }
?>

It writes the success message - but it doesn't send the mail . What do i need do do or change to solve this problem ?

 
Old July 27th, 2006, 06:57 AM
Registered User
 
Join Date: Mar 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to zimdawg79
Default

Check wether the SMTP server is specified in your php.ini

INTERNUT





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with sending mail in php Paula222 Beginning PHP 4 July 16th, 2006 03:38 PM
Problem sending SMTP mail Dsypher ASP.NET 2.0 Basics 3 February 16th, 2006 01:58 PM
Problem in sending an e-mail via ASP.NET Rashmi_Dubey ASP.NET 2.0 Basics 2 January 28th, 2006 03:36 AM
Sending mail problem!!!! NitinJoshi General .NET 2 January 13th, 2005 08:31 AM
Problem with sending mail nikunjn VS.NET 2002/2003 1 January 29th, 2004 08:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.