function generateEmailBody($title, $link, $from_name, $from_email, $to_name, $to_email, $message = null) { $output = array(); $output[] = $from_name . ' thought you might find this link interesting:'; $output[] = ''; $output[] = 'Title: ' . $title; $output[] = 'Link: ' . $link; if ($message) { $output[] = 'Message: ' . iBeginShare::messageFilter($message); } $output[] = ''; $output[] = '-----------------------------'; $output[] = $from_name . ' is using iBegin Share (http://www.ibegin.com/labs/share/)'; $output[] = '-----------------------------'; return implode("\r\n", $output); }