David Powers Lesson08 forgotten.php problem


i have strange problem when running forgotten.php. program works alright setting of mail_connector.php below. managed send , received email. works fine intially. after sometime, found problem running same program again. time generates error message of 'notice: underfined index: calvin_cccc@yahoo.com in c:\vhosts\phpcs5\lesson8\scripts\request_reset.php on line 25' , message 'no connection made because target machine actively refused it.'

 

any idea why ?

 

 

mail_connector.php

<?php

$mailhost = 'mail.agri-organica.com';

$mailconfig = array('auth'     => 'login',

                    'username' => 'calvin@agri-organica.com',

                                                  'password' => 'password');

$transport = new zend_mail_transport_smtp($mailhost, $mailconfig);

zend_mail::setdefaulttransport($transport);

if works once, should work time unless there has been change code or mail authentication settings.

 

the error message says problem on line 25 of request_reset.php, not mail_connector.php. example code in book on line looks this:

 

$mail->setfrom('webmaster@example.com', 'dw cs5 php');

 

that sets header in email. prevent spammers using mail server spam relay, it's common reject mail doesn't come authorized source. you're logging agri-organica.com smtp server, using yahoo.com email address in header. suspect server rejecting mail because header doesn't use agri-organica.com address. change address in line 25 of request_reset.php agri-organica.com address, , work.



More discussions in Develop server-side applications in Dreamweaver


adobe

Comments

Popular posts from this blog

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Upgrade 3.4.8 to 3.5.1 failed "download package failed" - Joomla! Forum - community, help and support

Fatal error during instalation - Joomla! Forum - community, help and support