I often end up with a bunch of gibberish at the beginning. Here's one example. I used the following PHP code to try and send a test message to a friend of mine, Andrew. I've pretty obviously changed his phone number to protect the innocent. Here's the code:
$to_addr = '<email@example.com>'; $subject = 'Hey Andrew'; $message = "Hey Andrew. So, um, I'm testing this.\r\n"; $message .= "Does it work?\r\n"; $message .= "The following letters should all be on different lines:\r\n"; $message .= "a\r\n"; $message .= "b\r\n"; $message .= "c\r\n"; $headers = "From:<firstname.lastname@example.org>\r\n"; $headers .= "Content-Type:text/plain;charset=iso-8859-1\r\n"; mail($to_addr, $subject, $message, $headers);But, much to my dismay, this code produced the following message on his phone:
Fr:SRS0=hGuo=6D =perfora.net=cg i-mailer-bounces -1048 (Hey Andrew) Hey. So, um, I'm testing this. Does it work? The following letters should all be on different lines:I think the reason the last three lines were truncated has to do with the character limit, although I'm not positive on that. So here's my question to pose to all of you intellectual giants: how do I get rid of the gibberish? What am I doing wrong? I feel like I'm so close, since the messages are successfully delivered, but I just can't seem to shake that random gibberish that appears. I've tried a couple of variations on the $headers, too. Any help is appreciated!