Hi all,
I am writing a script to email all fifty of my contacts from my address book from a CSV file. Everything is fine with the CSV file, i fgetcsv() without problems, but when I am sending my message, it is a good ten lines long with three paragraphs.
When I input my \n into the e-mail, it doesn't show a line break it actually displays "\n" in the e-mail without any line breaks in it. Just free flow text.
Here is my code:
//csv column 1=names, column 2=emails
$handle = fopen ("test.csv","r");
while ($data = fgetcsv ($handle, 1000, ","))
{
print $data[0] . "<br>\n";
print $data[1] . "<br><br>\n";
$message = 'Dear '.$data[0].',\n\nI hope you are well! It\'s been a while and I wanted to check in with you, see how you\'ve been, and make sure you have my long term contact info for your address book.\n\nI\'m still coordinating several special projects ahsdflkjhalksdjhf lkjahsdflkj hlaksjdhflkjahsdflkj halksdjhf laksjdhflkjahs lkjahsldk. That\'s all on my side - look forward to hearing how you are doing.\n\nTake care,\nball';
$message = wordwrap($message, 70);
mail($data[1], 'Greetings from Ball', $message, 'From: ball@gmail.com');
}
fclose ($handle);
Thanks a ton!