Run PHPMailer function after ajax function completes that adds row to custom table

Run PHPMailer function after ajax function completes that adds row to custom table