debugging mail submission on complete