Advertisement
carbonize

boundaries

Jun 10th, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.53 KB | None | 0 0
  1.     $emailboundary = md5(time()); // Just something random for the boundary
  2.     $emailboundary = '----=Email_Boundary_'.$emailboundary; // Full boundary
  3.     if(!empty($imagedata['mime']) && !empty($imagedata['name']) && !empty($imagedata['data']))
  4.     {
  5.       $emailheaders .= "\nDate: " . gmdate('D, d M Y H:i:s') . " -0000\nX-Mailer: Lazarus Guestbook\nMIME-Version: 1.0\nContent-type: multipart/mixed;\n   boundary=\"".$emailboundary."\"";
  6.       $emailbody = "\n\nThis is a multi-part message in MIME format.\nIf you are reading this then consider updating your email program.\n\n--".$emailboundary."\nContent-type: multipart/alternative;\n   boundary=\"".$emailboundary."Laz\"\n\n".
  7.       '--'.$emailboundary."Laz\nContent-type: text/plain; charset=".$this->VARS['charset']."; format=flowed\nContent-Transfer-Encoding: 7bit\nContent-Disposition: inline\n\n".
  8.       $this->undo_htmlspecialchars(strip_tags($emailmessage)).
  9.       "\n\n--".$emailboundary."Laz\nContent-type: text/html; charset=".$this->VARS['charset']."\nContent-Transfer-Encoding: 7bit\nContent-Disposition: inline\n\n".
  10.       "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n
  11.      <html>\n
  12.      <body>\n".
  13.       $emailmessage.
  14.       "\n</body>\n</html>\n\n--".$emailboundary.
  15.       "Laz--\n\n--".$emailboundary."\nContent-type: ".$imagedata['mime']."; name=\"".$imagedata['name']."\"\n".
  16.       "Content-Transfer-Encoding: base64\nContent-Disposition: attachment; filename=\"".$imagedata['name']."\"\n\n".$imagedata['data'].
  17.       "--".$emailboundary."--\n";;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement