complete resend email logic