First of all, is better use get_template_directory_uri()
instead of bloginfo(...
<input type="hidden" name="notify_url" value="<?php echo get_template_directory_uri(); ?>/ipn.php">
but you are right if you think the problem is not this one.
I cannot be sure, but I bet your problem is here:
include_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' );
This is a problematic way to include wp-load.php
, but …
Why load the entire wordpress environment for just sending an email?
Be aware that loading wp-load.php
you load all WP core files, get options from database, load all active plugins, load the active theme functions.php
and the parent theme functions.php
if you are using a child theme. You also trigger some actions and filters… a lot of unnecessary stuff.
You don’t need them at all: just send the email using php mail()
function, (or at least include a class like this).
Your process will be a lot faster and I bet… successfull.