fix sending email before payment

Fix sending email before payment. Issue #306413