#@(#)mailResult	1.13 03/02/99 23:25:39

####
##
## This file will be sourced so the environment parameter
## EXPLORER_EMAIL could be inherited
##
####


# execute this file only if in interactive mode and automatick e-mail
# was not selected.
if [ $BATCH_MODE = false ] && [ $EXPLORER_EMAIL = false ]
then
    echo
    echo "If this system has access to internet e-mail, results can be mailed"
    echo "automatically to our central database repository at:"
    echo "    $EXPLORER_ADDRESS"
    echo
    echo "If your e-mail bounces, be sure to read the e-mail section"
    echo "in the man page (to view man page do: ./explorer -help)"
    echo "to resolve the problem"
    echo 
    echo "Would you like to e-mail results [y/n]: \c"
    read e_mail
    
    while [ 1 ]
    do
        case $e_mail in
    	    y | Y)
    	        EXPLORER_EMAIL=$EXPLORER_ADDRESS
    	        export EXPLORER_EMAIL
    	        break 2
    	        ;;
    
            n | N)
        	break 2
    	        ;;
    
    	    *)
    	        echo "You must enter Y or N [Y/N]: \c"
    	        read e_mail
    	        ;;
        esac
    done
fi
