Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Description: Automated email attachment of WP All Export function
Submitted by websnail on October 4, 2017

add_action('pmxe_after_export', 'wpae_after_export', 10, 2);
function wpae_after_export( $export_id, $exportObj )
{

	$is_secure_import = PMXE_Plugin::getInstance()->getOption('secure');

	if ( ! $is_secure_import)
	{
		$filepath = get_attached_file($exportObj->attch_id);					
	}
	else
	{
		$filepath = wp_all_export_get_absolute_path($exportObj->options['filepath']);
	}
	
	if(@file_exists($filepath)) {
		$to = '[email protected]';
		$subject = 'Automated Export File';
		$message = 'Cron job complete... '."\r\n".'File attached';
		$headers = 'From: Your Name <[email protected]>' . "\r\n";
		$attachments = array($filepath);
		wp_mail( $to, $subject, $message, $headers, $attachments );
	}
}