I cant understand why I'm not receiving email from this function ... as you can see the smtp transcript is successful
I switched to using 10minutemail.com to receive email to make sure it wasnt being blocked by a blacklist or something.
I also have been successful in sending plain text using a script in the same directory to the same recipient and from the same sender and it worked fine.