Firstly, please use the code formatting capabilities of this forum -- it makes you code much easier to read and understand.
Second, why do you use pear mail for the first email and then the [man]mail[/man] function for the second email?
Third, you didn't even bother to check if the mail() call you made actually worked or not.
Fourth, your script could easily be exploited by someone else to use mail header injection if you choose to use the mail function.
Fifth, you don't validate the $to email to make sure it's a valid address (check out [man]filter_var[/man])
If I were you, I would copy the code that works to send the first email and modify it to send the other message.