What do you mean by "the third argument of your substr command should always be 1."
Could you write the code for that part?
About sending emails, sorry, this is not how forums work, everything is kept in the thread.
Also, I want the code to be able to find the palindrome for any number of digits and conditions that I want with minimal editing. Since I posted this, I leaned a few more things and I think that maybe a regex would speed up things, if I get to find out how to do it.