Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6095725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:50:40+00:00 2026-05-23T12:50:40+00:00

I am using the following code to send out a Multipart/Alternative HTML and Plain

  • 0

I am using the following code to send out a Multipart/Alternative HTML and Plain Text email. The emails are sending fine content wise, however some of them are getting caught in spam filters. This is the code I am using.

$notice_text = "This is a multi-part message in MIME format.";
$plain_text = "Some Plain Text Here\n\n";
$html_text = '<html><head><title>Sample HTML Email</title></head><body>';
$html_text .= '<p>Some text will go here.</p>';
$html_text .= '<p><img src="http://www.mydomain.com/img/offers.jpg" /></p>';
$html_text .= '<p>Can\'t see the images? <a href="http://www.mydomain.com/print_offer.php?promo=' . $promo_code . '">Click here</a></p>';
$html_text .= '</body></html>';

$semi_rand = md5(time());
$mime_boundary = "==MULTIPART_BOUNDARY_$semi_rand";
$mime_boundary_header = chr(34) . $mime_boundary . chr(34);

$from = "Test Email <testemail@testemail.com>";
$subject = "Get Your Offers Here";

$body = "$notice_text

--$mime_boundary
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

$plain_text

--$mime_boundary
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

$html_text

--$mime_boundary--";

mail($email, $subject, $body,
    "From: " . $from . "\n" .
    "bcc: " . $bcc . "\n" .
    "MIME-Version: 1.0\n" .
    "Content-Type: multipart/alternative;\n" .
    "     boundary=" . $mime_boundary_header);

What is causing it to go into spam filters? When I send the email as a plain text they go through just fine, it is only when I send the HTML email that they are getting caught. Any help would be appreciated. Is there more I can add to the headers to help with spam filter prevention?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:50:41+00:00Added an answer on May 23, 2026 at 12:50 pm

    Many spam filters use a cumulative scoring system to decide whether an incoming message is spam. Individual “spammy” problems may slide through, but if several of them are present in a particular email, a threshold reached and the message is dumped.

    In your message, I see a few things that may increase your score:

    Subject: “Get Your Offers Here”

    Solution: Try including specific text about the contents of your email and consider including your company name

    and

    From: “Test Email: testemail@testemail.com“;

    Solution: Use a real email address. Also, make sure the server you are sending email from is configured properly (see SPF)

    and

    Content: Unknown

    Solution: Make sure your content is specific and relevant. Make sure any links point to the domain from which the email originated.
    Avoid using too many “spammy” keywords (“offer,” “free,” “l@@k”,
    etc.).

    You can perform a smell test on your own emails. Remove all references to your company and products and enter generic terms. Consider the result to see if you would delete the message if it arrived in your mail box.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to send an email using c# using the following code. MailMessage
I'm using the following code to loop through a directory to print out the
I have the following code I am using to send data to a MailChimp
Using the following code I get a nice formatted string: Request.QueryString.ToString Gives me something
I'm using the following code to query a database from my jsp, but I'd
I've been using the following code to open Office Documents, PDF, etc. on my
I am using following PHP code to connect to MS Access database: $odb_conn =
I am currently using the following code to create a web request: Dim myRequest
I'm using the following code within the JCProperty class to retrieve data from a
I'm using the following code, using the SharpZipLib library, to add files to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.