On Mar 18, 2010, at 8:29 PM, Benjamin Rister wrote:
> I haven't seen any issues with this, even with gmail. How do you make
> the emails? What MIME type do you use for the attachment?
This is from the AquaticPrime.php file, I don't think I changed relevant stuff
there:
function sendMail($to, $from, $subject, $message, $licenseBase64Encoded, $name,
$bcc='')
{
// Create a random boundary
$boundary = base64_encode(MD5((string)rand()));
$headers = "From: $from\n";
if ($bcc != "")
$headers .= "Bcc: $bcc\n";
$headers .= "X-Mailer: PHP/".phpversion()."\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\n";
$headers .= "Content-Transfer-Encoding: 8bit\n\n";
$headers .= "This is a MIME encoded message.\n\n";
$headers .= "--$boundary\n";
$headers .= "Content-Type: text/plain; charset=\"utf-8\"\n";
$headers .= "Content-Transfer-Encoding: 8bit\n\n";
$headers .= "$message\n\n\n";
$headers .= "--$boundary\n";
$headers .= "Content-Type: application/octet-stream; name=\"$name\"\n";
$headers .= "Content-Transfer-Encoding: base64\n";
$headers .= "Content-Disposition: attachment\n\n";
$headers .= chunk_split($licenseBase64Encoded)."\n";
$headers .= "--$boundary--";
mail($to, $subject, "", $headers);
}
$name is the filename (for example "my name.rubitrack2-license"). A user
affected by the problem would get "my name.rubitrack2-license.xml" (note the
added .xml extension).
Regards
Markus
--
______________________________
Markus Spoettl
<http://www.rubitrack.com>