PEAR::Mail leaving the To field blank
Monday, November 7th, 2005Update: As mentioned, i was trying to get a php mass mailing script working. It seemed to be working well in the first little test except that it was leaving the "To:" field blank.
After a lot of searching which threw up no answers I started looking at disabling parts of the programme starting with the sending of html and other multipart mime mails (try saying that after a good night out). As soon as I´d done this it all started working fine. As soon as I enabled it again it stopped working again.
After doing some messing with headers from Outlook generated emails and a few others I found out it was because I was setting the "To" header last, after the Mime version and content type. To get it working properly you just need to set the "To" header before the others. This gets it showing up in mail clients the way it should.
Time for the next series of tests…