<?php
/*******************************************************************************

    Author ......... Jimmy Conner
    Contact ........ jimmy@sqmail.org
    Home Site ...... http://www.sqmail.org/
    Program ........ Address Add
    Version ........ 2.1
    Purpose ........ Allows you to add the From address to the address book

*******************************************************************************/

      global $message;
      $this->decodedfrom = "";
      if (function_exists('sqgetGlobalVar')) {
         $header = $message->rfc822_header;
         if ($header) {
            $this->decodedfrom = $header->getAddr_s('from');
            if ($this->decodedfrom == "")
               $this->decodedfrom = $header->getAddr_s('sender');
         }
      } else {
         $this->decodedfrom = $message->header->from;
      }
      $this->decodedfrom = decodeHeader($this->decodedfrom);
      $this->decodedfrom = clean($this->decodedfrom);
?>