Q:

PHP mailer with WordPress - how to pull admin email?

I'm trying to use a mailer in my WordPress theme, but I don't seem to be able to pull admin email from WordPress.
I have a mailer.php file in my theme folder and tried using get_bloginfo('admin_email') function but it doesn't work. I'm a PHP newbie, but I'm guessing the mailer.php file isn't "connected" to WordPress installation. I tried including it in the functions.php file, but it only caused my theme to go blank.
So my question is, how do I pull WordPress functions in files, that aren't theme files?
To answer Pekka's comment - I get an error:
Fatal error:  Call to undefined function  get_bloginfo() in mailer.php on line 4

A:

Import WordPress's functions using 
include "/path/to/your/wordpress/wp-blog-header.php";

After that, you will be able to call get_bloginfo().  

