Wrox Programmer Forums
|
BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143
This is the forum to discuss the Wrox book Beginning PHP 6, Apache, MySQL 6 Web Development by Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz; ISBN: 9780470391143
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 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 September 25th, 2009, 10:56 AM
Registered User
 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mail Function in PHP6 doesn't work

Hello,
I have been working through this book and some functions don't seem to work well. I am in chapter 11 now and can't seem to get the mail () to work.

I installed WAMP Server Apache 2.2.11, MySQL 5.1.36, PHP 6.0dev.
Copied the code from the book

Code:
<?php
mail('[email protected]', 'Hello World',
    'Hi, world. Prepare for our arrival. We are starving!');
?>
and it doesn't send mail. I also tried the postcard.php and tried to set up the mail correctly.
I have an external smtp mail server. I added a new user and password and correctly set up the service but can't get PHP6 to send mail.

I looked at phpmailer and it does work.

Would anybody be able to give me help on this topic?

Thanks in advance

Ron
 
Old January 29th, 2010, 10:15 AM
thg thg is offline
Registered User
 
Join Date: Jan 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm having trouble getting started with the same chapter.

My error message is:

Code:
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\database\Apache Software Foundation\Apache2.2\htdocs\firstmail.php on line 3
I believe I have copied the code correctly:
Code:
<?php
mail('[email protected]', 'Hello World',
	'Hi, World.  Prepare for our arrival.  We are starving!');
?>
(I had a valid e-mail address in there.)

I did set "sendmail_from" in php.ini.

I have no confidence that my SMTP server (Free SMTP Server) is working properly, but it doesn't seem like php is getting as far as calling the SMTP server.

Thanks,
Tim
 
Old February 13th, 2010, 12:39 AM
Authorized User
 
Join Date: Jan 2010
Posts: 25
Thanks: 1
Thanked 4 Times in 4 Posts
Default

I haven't gotten there yet, but since there haven't been any replies:

I recently reinstalled PHP using the windows installer. Having read this post, when I got to an option to include SMTP, I included it. I don't know if this will solve your problem yet, but thought there was a chance it might.

Hope this helps, and fingers crossed,
Boz





Similar Threads
Thread Thread Starter Forum Replies Last Post
There is no release of PHP6 why then is this title PHP6 used varuna22 BOOK: Professional PHP6 4 August 12th, 2010 10:15 AM
E-Mail button doesn't work sektor Excel VBA 0 April 14th, 2009 01:22 AM
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
mail function doesn't work ashraf_gawdat Beginning PHP 2 January 29th, 2007 07:21 AM
can't seem to get the mail() function to work Graham76 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 October 5th, 2004 01:59 PM





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