Zend Framework

Zend_Mail_Transport_Smtp constructor leaves $_name property same

Details

  • Type: Docs:  Problem Docs: Problem
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.8
  • Fix Version/s: 1.9.6
  • Component/s: Zend_Mail
  • Labels:
    None
  • Fix Version Priority:
    Should Have

Description

When I try Example 33.4. Sending Multiple Mails per SMTP Connection from http://framework.zend.com/manual/en/zend.mail.multiple-emails.html first of all I get a warning message "inet_pton(): Unrecognized address localhost" and if I change the $host parameter of constructor to different IP ADDRESS NOT HOSTNAME, the warning message continues to emerge.

Also as I noticed in code of Zend_Mail_Transport_Smtp->_sendMail method it tries to execute next line $this->_connection->helo($this->_name);. Is it proper line or it should be like this $this->_connection->helo($this->_host);}?

P.S. I think for loops in examples 33.4 and 33.5 have mistakes for ($i = 0; $i > 5; $i++) { it will never do any iteration because of condition $i > 5. It should be $i < 5

Activity

Hide
Marcos Gil Fuertes added a comment -

That's TRUE. What is the "_name" property used for?

Apparently, only for that call. It's set in the construct method from $config['name'] value (if set). By default, its value is "localhost".

Does it make sense to duplicate the 'host' value? Or are we missing something about "helo" method?

Thanks

Show
Marcos Gil Fuertes added a comment - That's TRUE. What is the "_name" property used for? Apparently, only for that call. It's set in the construct method from $config['name'] value (if set). By default, its value is "localhost". Does it make sense to duplicate the 'host' value? Or are we missing something about "helo" method? Thanks
Hide
Satoru Yoshida added a comment -

Hi, Marcos.

The $_name is used for sender hostname. It is different from $_host which means receiver's one.

I think the document seems to be bit difficult to understand how to use helo() function.

So, I will update the document.

Show
Satoru Yoshida added a comment - Hi, Marcos. The $_name is used for sender hostname. It is different from $_host which means receiver's one. I think the document seems to be bit difficult to understand how to use helo() function. So, I will update the document.
Hide
Satoru Yoshida added a comment -

Solved in SVN r18755 of trunk, r18756 of 1.9 branch.

Show
Satoru Yoshida added a comment - Solved in SVN r18755 of trunk, r18756 of 1.9 branch.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: