/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
** Qt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
**
**	ultima revisione: 28/12/2004
**
**	Qtballit 0.1 beta - Qt ballistic calculation app - Copyright (C)  Stefano Jodice 2004  
**
**     	This program is free software; you can redistribute it and/or modify
**     	it under the terms of the GNU General Public License as published by
**     	the Free Software Foundation; either version 2 of the License, or
**    	 (at your option) any later version.
** 
**    	This program is distributed in the hope that it will be useful,
**     	but WITHOUT ANY WARRANTY; without even the implied warranty of
**    	 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
**     	GNU General Public License for more details.
**
**     	You should have received a copy of the GNU General Public License
**     	along with this program; if not, write to the Free Software
**    	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
**
*********************************************************************************/

#include <stdlib.h>
#include <string>
#include <unistd.h>
#include <stdio.h>
#include <qmessagebox.h>
//#include <errno.h>

#define ADDRESS " jagerhans@tiscali.it"
#define MAIL1 "evolution "
#define MAIL2 "kmail "

 char postino[40];

void AboutQtB::init()
{
  

}
	
void AboutQtB::destroy()
{
    

}
   

void AboutQtB::mailme()
{
       int ret;
  strcpy (postino, MAIL1);
  strcat(postino,ADDRESS);
  
    ret = (system (postino)) ;
    
    
	if (ret != 0)
		
	  strcpy (postino, MAIL2);
	  strcat(postino,ADDRESS);
	  
	   ret = (system (postino)) ;
	   
	
	 
		  if (ret != 0)
	   {
	
	     
	      sprintf( postino,"%s",(getenv("MAILER"))); 
	       strcat(postino,ADDRESS);
	
	     
	      ret = (system(postino));
	      
	    
	       
	        if (ret != 0)
	     
	      {
	
	      QMessageBox::warning(this, tr("Qtballit"),tr("Nessun client di posta trovato.\n Specificare il client di posta predefinito nella variabile d'ambiente $MAILER\n"));
	  }
	    }
      }






