C# Rollback sendemail
<p>I wrote a code to recover passwrod in my website.The user enter his email address and we send a new password to him.In additcion,we also change his password in DB to newest password.</p>

<p>Problem:
If code for send mail fails,i cant change his password in DB,and if code to change password fails i cant send mail.</p>

<p>Take a look:</p>

<pre><code>public bool RecoverPassword(string email)
        {
            try
            {
                SceLoginMail sceEmail = new SceLoginMail(email, "Recuperação de senha", 5);
                ChangeUserPassword(sceEmail.NovaSenha, email);
                sceEmail.SendEmail();
                sceUsers.CommitOrRollBack(true);
                return true;
            }
            catch (Exception ex)
            {
                sceUsers.CommitOrRollBack(false);
                return false;
            }
        }
</code></pre>

<p>I try to rollback in DB if an exceptions occurs in SendEmail method.But,i cant "RollBack" the SendMail method if an exceptions throws in CommitOrRollback method.If so,system will send the mail and wont change it on DB.</p>

<p>Any ideias?</p>
