Setting up for Lesson 8
Update start/scripts/library.php with your own database information.
Copy start/scripts/library.php to overwrite completed/scripts/library.php
PHP email
Sending email with the basic PHP core libraries is a snap, just call
mail($to, $subject, $headers, $parameters);
This may be fine for an autoresponder contact form acknowledgement, but Zend_Mail has much more functionality: simplifying attachments, iterative email dispatching, styling HTML mail and protecting from hacker attacks.
Zend_Mail
Use sendmail transport
Do not use recapcha – requires domain specific key
For some reason, the “send comments” submit button doesn’t show up. Again, can you take a look and clue me in, please.
Thanks.
Hi Linda – try adding the send comment button –
Very weird. I looked at “View Source” and the code for the
‘send comment” button is not there. However, it is in the code of the page that I made. Strange indeed.
I seem to have hit a roadblock. I have typed in all the code in lesson 8
(leaving out the recaptcha part)
My comments.php form displays much of the code from process_comments.php at the top in LiveView. This code shouldn’t be visible.
I have no idea why–any suggestions? (also it is only a blank screen in the browser)
I checked the same file in the completed folder and it also does the same thing.
I don’t know how to better illustrate the problem. Hope it makes sense to someone.
thanks
Mark – Your library.php file needed to be updated with the correct path for the Zend libraries and Autoloader. I logged into your server and updated those two lines and the comment form seems to work now.
thanks Jay
I wasn’t looking there.
still having some issues:
When I enter the info and click Send comments button, the form tries to do something and eventually puts “connection timed out” at the top of the page and I haven’t received email yet.
Hi Mark,
I had the same problem except that it didn’t give me the connection time out message. You could check to make sure the email addresses are different – see page 273 Caution. I went through and made sure the email addresses matched where they were supposed to and were different where needed and finally it worked. Mail received.
Now, back to Ch 7!
Annette
I think it’s easiest to stick with the sendmail protocol not the SMTP protocol, as explained on page 261
Yes, once I replaced the SMTP code with the sendmail code, I was able to receive an email with the form data.
And I found my problem. Same as before – I had one of my email addresses written incorrectly on the mail connector page. Once I changed the edu to com the sendmail code worked. Something about having a clear brain helps, too.
A request for help. What do you mean by replacing the Zend smtp code with sendmail code. I have the same connection time out problem like Mark Alarie. Here is my code for the mailconnector:
‘login’,
‘username’ => ‘info@kdawgtv.com’,
‘password’ => ‘xxxxxx’);
$transport = new Zend_Mail_Transport_Smtp($mailhost, $mailconfig);
Zend_Mail::setDefaultTransport($transport);
Where would I make the change with sendmail???? Any help is greatly appreciated. Thank you.
@Kevin – more information about zend mail is at…
http://framework.zend.com/manual/en/zend.mail.introduction.html