Zend_Mail::getReplyTo PHP Method

getReplyTo() public method

Returns the current Reply-To address of the message
public getReplyTo ( ) : string | null
return string | null Reply-To address, null when not set
    public function getReplyTo()
    {
        return $this->_replyTo;
    }

Usage Example

Example #1
0
 public function testSettingFromDefaults()
 {
     Zend_Mail::setDefaultFrom('*****@*****.**', 'John Doe');
     Zend_Mail::setDefaultReplyTo('*****@*****.**', 'Foo Bar');
     $mail = new Zend_Mail();
     $headers = $mail->setFromToDefaultFrom()->setReplyToFromDefault()->getHeaders();
     $this->assertEquals('*****@*****.**', $mail->getFrom());
     $this->assertEquals('*****@*****.**', $mail->getReplyTo());
     $this->assertEquals('John Doe <*****@*****.**>', $headers['From'][0]);
     $this->assertEquals('Foo Bar <*****@*****.**>', $headers['Reply-To'][0]);
 }