getReturnPath() public method

Get the return-path (bounce-detect) address.
public getReturnPath ( ) : string
return string
 /** Determine the best-use reverse path for this message */
 private function getReversePath(Swift_Mime_Message $message)
 {
     $return = $message->getReturnPath();
     $sender = $message->getSender();
     $from = $message->getFrom();
     $path = null;
     if (!empty($return)) {
         $path = $return;
     } elseif (!empty($sender)) {
         $keys = array_keys($sender);
         $path = array_shift($keys);
     } elseif (!empty($from)) {
         $keys = array_keys($from);
         $path = array_shift($keys);
     }
     return $path;
 }
 /** Determine the best-use reverse path for this message */
 protected function getReversePath(Swift_Mime_Message $message)
 {
     $return = $message->getReturnPath();
     $sender = $message->getSender();
     $from = $message->getFrom();
     $path = null;
     if (!empty($return)) {
         $path = $return;
     } elseif (!empty($sender)) {
         // Don't use array_keys
         reset($sender);
         // Reset Pointer to first pos
         $path = key($sender);
         // Get key
     } elseif (!empty($from)) {
         reset($from);
         // Reset Pointer to first pos
         $path = key($from);
         // Get key
     }
     return $path;
 }