Hi
I'm using this to send an email :
// create the email and send it off
$subject = "File you requested from RRWH.com";
$from = "scripts@rrwh.com";
$headers = 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-Type: multipart/mixed;
boundary="----=_NextPart_001_0011_1234ABCD.4321FDAC"' . "\n";
$message = '
This is a multi-part message in MIME format.
------=_NextPart_001_0011_1234ABCD.4321FDAC
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hello
We have attached for you the PHP script that you requested from http://rrwh.com/scripts.php
as a zip file.
Regards
------=_NextPart_001_0011_1234ABCD.4321FDAC
Content-Type: application/octet-stream; name="';
$message .= "$thisfile";
$message .= '"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="';
$message .= "$thisfile";
$message .= '"
';
$message .= "$encoded";
$message .= '
------=_NextPart_001_0011_1234ABCD.4321FDAC--
';
// now send the email
mail($email, $subject, $message, $headers, "-f$from");
?>
This was found here:
http://theserverpages.com/php/manual/en/function.base64-encode.php
This is all working fine, but I would like to change this :
And have it display a variable ($body) instead.
Can you help me do that ?
$Body is already created and is being used further up my script, and that is fine. So to save me having to duplicate the same information again, I'd like to use it here.
If I delete the old bit and just add $Body, the email arrive with just $Body, not the actual text it should have !!
Help ? 🙂
Thanks