# Random Characters send with PHP mail()

**URL:** <https://forum.kirupa.com/t/random-characters-send-with-php-mail/249400>\
**Category:** programming\
**Created:** [January 18, 2008, 9:27am UTC](https://forum.kirupa.com/t/random-characters-send-with-php-mail/249400 "2008-01-18T09:27:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kotti](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@Kotti](https://forum.kirupa.com/u/Kotti)\
**Post date:** [January 18, 2008, 9:27am UTC](https://forum.kirupa.com/t/random-characters-send-with-php-mail/249400/1 "2008-01-18T09:27:25Z")

</div>

Hi guys, I’m having a slight problem with sending emails. The email sends with the message etc as it should be, but it adds this at the bottom of the email content:

²z¤‡ò¢èZ½æ§v‹azº®z¸ž²· j·bž azg§¶Šî¥Ö­z™^jÇœ¢{ZrÜ¨º¹bžKn¶Šè®Ç§w\*.­éšŠ[-¡¨kyðj)¢6jºr‹†çréiÖ­§¶Øu§“ö

The code is as follows:

```php
$to = "".$email."";
    $re = "Password Request";
    $msg = ' **MESSAGE**';

$headers = 'From: Mentor Update - University of ******<****** @hud.ac.uk>' ."
";
$headers .= "MIME-Version: 1.0
";
$boundary = uniqid("HTMLDEMO");
$headers .= "Content-Type: multipart/alternative" . 
   "; boundary = $boundary

";
$headers .= "This is a MIME encoded message.

";
$headers .= "--$boundary
" . 
   "Content-Type: text/html; charset=ISO-8859-1
" . 
   "Content-Transfer-Encoding: base64

";
$headers .= chunk_split(base64_encode("".$msg.""));

mail( $to, $re, $msg, $headers );

```

Hope you will appreciate censoring the content and e-mail address 🙂

Help with this will be appreciated! Thanks.
