Pbe errors

A few PBE error fixes for RC

1) the log_mail function had the wrong db cast for the fields, plus it was not used in two of the three places it should have been (the inline stuff was right, I think in at least one place).
2) when using the queue, the security key was written to the file as expected, but on fail the body with that security key was saved, rinse and repeat and 10 failures you would get an email with 11 security keys of which one was valid :p       
3) the quote link comes in as author link date OR author date link .... I think this occurs inside of sceditor but not sure, but could not find where the swap occurred.  So when you can't beat them, join them, I added an additional regexx to parse the other variant so pbe output text convert more nicley.  This shoudl fix what @emanuele45 reported.  Also added additional spacing around the quote.