Is there any reason why this would send duplicate emails? I have a PHP page with only this code on it and every time I run it it sends me two emails.
Just in case, I discovered my code had a command to spare and it generated two emails be sent:
I deleted this "\r\n" , it fixed the trouble.