How to sent a email outside WordPress?

If you are outside WordPress and want to load Wordpess, you only need:

require ('/path/to/wp-load.php');

In some situations you may want to load only some WordPress functions, for example:

define('SHORTINIT', true);
require ('/path/to/wp-load.php');
require( ABSPATH . WPINC . '/formatting.php' );
require( ABSPATH . WPINC . '/meta.php' );
require( ABSPATH . WPINC . '/post.php' );
//Load more files if you need

Anyway, I think this is the wrong way. You say that you are in a WordPress page, so why do you get outsite WordPress? Are you making an Ajax request? If so you should use the Ajax API. See:

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)