What Theme are you using? What file did you add to the Theme? How/in what context will WordPress use/render this new file?
–
Chip BennettMar 6 '12 at 16:01

I am using a custom theme and I added a file called "sendEmail.php" which takes data from an AJAX call and sends an email using wp_mail().
–
user13874Mar 6 '12 at 16:18

2

I think the issue is that you're trying to use WordPress functions outside the context of WordPress. Just a suggestion, but you might get more effective answers if you re-phrased your question as how to take data from an AJAX call and send an email using wp_mail().
–
Chip BennettMar 6 '12 at 16:38

i see... does that "moving files around" really happens? i havent noticed that wp-load.php moved since 2.1 (which is the first verstion i installed) - not ideal solution for sure but real easy for a single, few files which you just want to put into your design no?
–
Sagive SEOMar 7 '12 at 8:14

Yes, it happens. I have fixed performance problems for some clients, and part of the job was it to move the wp-content to another, cookieless domain. Themes or plugin searching for wp-load.php would just die then.
–
toscho♦Mar 7 '12 at 8:20