Jump to content

Email issue: SPAM: BODY: Message only has text/html MIME parts (-17)


this.user
 Share

Recommended Posts

I am trying to eliminate this issue but I have had no luck here is my current code:

 

$from = 'help@my.com';

$body = "<html>\n";
	$body .= "<body style=\"font-family:Verdana, Verdana, Geneva, sans-serif;\">\n";
	$body .= $message;
	$body .= "</body>\n";
	$body .= "</html>\n";

$boundary = uniqid('np');

$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";

$headers = "From: $from";
$headers .= "\nMIME-Version: 1.0\n" ."Content-Type: multipart/alternative;\n" ." boundary=\"{$mime_boundary}\"";

$message = "This is a multi-part message in MIME format.\n\n" .
	"--{$mime_boundary}\n" .
	"Content-Type: text/html; \n" .
	"Content-Transfer-Encoding: 7bit\n\n" .
	$body . "\n\n" . "--{$mime_boundary}--\n";

mail($to, $subject, $message, $headers, '-f'.$from);

 

I have tried adding the plain text part but nothing has worked, could someone else look at this and show me what I need to add so that it has the text/plain MIME part as well?

Link to comment
Share on other sites

$headers = "From: $from";
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
$headers .= "\nMIME-Version: 1.0\n" ."Content-Type: multipart/alternative;\n" ." boundary=\"{$mime_boundary}\"";

$message = "This is a multi-part message in MIME format.\n\n" .
. "--{$mime_boundary}\n"
. "Content-Type: text/html; \n"
. "Content-Transfer-Encoding: 7bit\n\n"
. $body . "\n\n"
. "--{$mime_boundary}\n"
. 'Content-Type: text/plain; charset="utf-8"' . "\n"
. 'Content-Transfer-Encoding: 7bit' . "\n\n"
. 'This is a HTML email and your email client software does not support HTML email!' . "\n\n"
. "--{$mime_boundary}--\n";

Link to comment
Share on other sites

the script works fine, i must of edit it incorrectly

 

$from = 'help@me.com';
                        $body = "<html>\n";
                        $body .= "<body style=\"font-family:Verdana, Verdana, Geneva, sans-serif;\">\n";
                        $body .= $message;
                        $body .= "</body>\n";
                        $body .= "</html>\n";

                        $semi_rand = md5(time());
                        $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
                        $headers = "From: $from";
                        $headers .= "\nMIME-Version: 1.0\n" ."Content-Type: multipart/alternative;\n" ." boundary=\"{$mime_boundary}\"";

                        $message = "This is a multi-part message in MIME format.\n\n" .
                        "--{$mime_boundary}\n" .
                        "Content-Type: text/html; \n" .
                        "Content-Transfer-Encoding: 7bit\n\n" .
                        $body . "\n\n" .
                        "--{$mime_boundary}\n"
                        . 'Content-Type: text/plain; charset="utf-8"' . "\n"
                        . 'Content-Transfer-Encoding: 7bit' . "\n\n"
                        . 'This is a HTML email and your email client software does not support HTML email!' . "\n\n"
                        . "--{$mime_boundary}--\n";

                        mail($to, $subject, $message, $headers, '-f'.$from);

 

Here is the email source

 

Authentication-Results: hotmail.com; sender-id=temperror (sender IP is *****) header.from=help@me.com; dkim=none header.d=me.com; x-hmca=none

X-Message-Status: n:0:n

X-SID-PRA: help@me.com

X-DKIM-Result: None

X-AUTH-Result: NONE

X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MjtTQ0w9NA==

X-Message-Info: 6sSXyD95QpXDYhE6zcmtxkWgR951auLXZ7lJ145zV4MVVKBAPv5jZJLe26XameVxvmrrP3NyAspwPYnm7OkXE1Ey9jSmv+LJYZTYTRZI3IpFee+j1rD7gPirv+dmpP1iFxq/Zeb1xZY=

Received: from p3plsmtps2ded03-01.prod.phx3.secureserver.net ([****]) by SNT0-MC1-F6.Snt0.hotmail.com with Microsoft SMTPSVC(*****);

Thu, 6 Oct 2011 19:42:36 -0700

Received: (qmail 7411 invoked from network); 7 Oct 2011 02:42:35 -0000

Received: from unknown (HELO ip-****.ip.secureserver.net) ( ***** )

  by p3plsmtps2ded03-01.prod.phx3.secureserver.net (***0) with ESMTP; 07 Oct 2011 02:42:35 -0000

Received: (qmail 15779 invoked by uid 48); 6 Oct 2011 22:42:35 -0400

Date: 6 Oct 2011 22:42:35 -0400

Message-ID: <20111007024235.15777.qmail@ip-****.ip.secureserver.net>

To: qwe@hotmail.com

Subject: Account Activation

X-PHP-Originating-Script: 0:email.utility.php

From: help@me.com

MIME-Version: 1.0

Content-Type: multipart/alternative;

boundary="==Multipart_Boundary_x9a68e36d072eec0730e7bac6a9f1b0b6x"

Return-Path: help@me.com

X-OriginalArrivalTime: 07 Oct 2011 02:42:36.0106 (UTC) FILETIME=[C58CA2A0:01CC849A]

 

This is a multi-part message in MIME format.

 

--==Multipart_Boundary_x9a68e36d072eec0730e7bac6a9f1b0b6x

Content-Type: text/html;

Content-Transfer-Encoding: 7bit

 

<html>

<body style="font-family:Verdana, Verdana, Geneva, sans-serif;">

Dear asd,<br /><br />

 

Please click on this link to activate your me.com account:

<a href="http://www.me.com/activation/?code=0d16f16c88840609cde3697c24dc3e8d3184988a17ea1b1bd26c5cf5abf4891945c57e">http://www.me.com/activation/?code=0d16f16c88840609cde3697c24dc3e8d3184988a17ea1b1bd26c5cf5abf4891945c57e</a><br /><br />

 

Thank you,<br /><br /><br /><br /><br />me.com!</body>

</html>

 

 

--==Multipart_Boundary_x9a68e36d072eec0730e7bac6a9f1b0b6x

Content-Type: text/plain; charset="utf-8"

Content-Transfer-Encoding: 7bit

 

This is a HTML email and your email client software does not support HTML email!

 

--==Multipart_Boundary_x9a68e36d072eec0730e7bac6a9f1b0b6x--

 

 

and here is the MSQ data

 

MQS Score: 78 of 100

SPAM: BODY: Message only has text/html MIME parts (-17)

SPAM: URI: URI hostname has long non-vowel sequence (-5)

Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.