Wrox Programmer Forums
|
BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9
This is the forum to discuss the Wrox book PHP and MySQL: Create-Modify-Reuse by Timothy Boronczyk, Martin E. Psinas; ISBN: 9780470192429
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 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 January 17th, 2011, 02:37 PM
Registered User
 
Join Date: Jan 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 1 email confirmation -- no message sent

I was successful in including the code to send an email to confirm the addition of a user account. While a check of MySQL confirmed that the account was created and the message "Thank for registering" was shown, no email was sent and therefore the account is not active.

Any ideas as to what could be stopping the email from being sent?
 
Old January 18th, 2011, 02:52 AM
Authorized User
 
Join Date: Jul 2009
Posts: 77
Thanks: 4
Thanked 6 Times in 6 Posts
Default

Hi amgutter,

Thanks for including the information on this issue.

@mail must have returned TRUE, otherwise you would not have
gotten the message "Thank you for registering...". Now,
just because @mail returns TRUE, that does not mean the mail
will reach the destination. It only means it was accepted for
delivery. What happens if you write a very simple php
test case program that sends mail to yourself, does that
work? What if you try sending to a couple of different
email addresses, do any of those work?

Check your spam/junk folder.

I hope this helps.
The Following User Says Thank You to kenj For This Useful Post:
amgutter (January 20th, 2011)
 
Old January 18th, 2011, 11:00 PM
Registered User
 
Join Date: Jan 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Another possibility...

The message was never sent to my spam folder. I tried creating a simple email script which returned without errors, but still no email in my inbox.

I was wondering if it could be an issue in php.ini. I noticed that "sendmail_from" is set to no value. I imagine this has to be set to something??
 
Old January 20th, 2011, 09:26 AM
Registered User
 
Join Date: Jan 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Resolved email issue

In the end it seems that the problem was one of configuring a mail server.

I followed a quick tutorial found on youtube for the purpose of sending an uncomplicated email to myself -- which failed at first.

Here's the link:

http://www.youtube.com/watch?v=DpdqLCMo4Hw

The problem that was occurring was that I needed to set a value for the SMTP, which I did by adding the line
Code:
ini_set("SMTP", "smtp.gmail.com")
I didn't know I had to specify an outgoing mail server. This was easy enough as my existing gmail account could be used.

After I ran the script, I received the email successfully. Interestingly enough, I also received about twenty other email attempts that had been waiting for a correct path to open.

Probably a rookie mistake, but I happily pass along a solution that worked for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 1: send confirmation message andrewfarq BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 3 October 22nd, 2010 01:41 PM
webshop email confirmation message Nick23 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 September 14th, 2007 03:43 PM
Email Confirmation Katachi Dreamweaver (all versions) 1 December 18th, 2005 07:19 AM
how to show a confirmation message? noor ASP.NET 1.0 and 1.1 Basics 10 May 16th, 2005 03:12 AM
Confirmation message on delete of Data grid item [email protected] VS.NET 2002/2003 1 December 22nd, 2004 02:27 AM





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