Question

I am writing a script for a film. I have a basic script that sends an HTML email to two sets of emails. On the form you enter in the event information and that information gets sent to two lists of users, the "Desired Guests" and the "Undesired Guests" they both get the same exact HTML email however I need the email for the "Undesired Guests" to go to the spam folder. So what I did was for the "Undesired Guest" email list was insert a bunch of spam content into the body of the email as I need this email to send to the spam folder. The "Desired Guests" email should go to the inbox just fine (as is currently is)

Is there any way I can make the "Undesired Guests" email to go spam for sure? Can I send the email through an outside server with a different IP and bad reputation to make these emails go to spam?

Any input would be a great help.

 <?php
    if(isset($_POST['submit'])) {
        $event = strtoupper($_POST['event']);
        $host = strtoupper($_POST['host']);
        $location = strtoupper($_POST['location']);
        $date = $_POST['date'];
        $start_time = $_POST['start_time'];
        $end_time = $_POST['end_time'];
        $msg = ucfirst($_POST['msg']);
        $mainuser = $_POST['mainuser'];
        $wrong_user = $_POST['wrong_user'];

    if($mainuser!='') {
        $user_mail = explode(",", $mainuser);
        $count = count($user_mail);
        $sub = "You're Invited";
        $sender = "info@cdell.me";

        for($i=0;$i<$count;$i++){
            $mail_to = $user_mail[$i];
            $mail_body =
            '<style type="text/css">
        <!--
       .style1 {color: #8f8f8f}
        -->
        </style>
        </head>

        <body style="font-family:Arial, Helvetica, sans-serif; background:#f5f5f5; line-    height:24px;">
        <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
          <tr>
            <td><img src="http://www.cdell.me/invite-site/header.png" width="600" height="200" /></td>
          </tr>
          <tr>
    <td height="50" bgcolor="#ececec"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>


      </tr>
    </table></td>
      </tr>
      <tr>
        <td bgcolor="#e0e0e0" style="padding:20px; font-size:16px; color:#8f8f8f" align="center">
    <p><strong>'.$event.'</strong></p>
    <p><strong>When:</strong> '.$date.' &nbsp; '.$start_time.' - '.$end_time.'</p>
    <p><strong>Where:</strong> '.$location.'</p>
    <p><strong>Message From '.$host.':</strong> <br /> '.$msg.'</p><br /><br /></td>
      </tr>
      <tr>
        <td bgcolor="#e0e0e0" align="center"><a href="#" style="padding-top:10px; padding-bottom:10px; padding-left:20px; padding-right:20px; font-size:24px; font-weight:bold; color:#fff; background:#2ecc71; text-decoration:none;">RSVP!</a></td>
      </tr>
      <tr>
    <td height="30" bgcolor="#e0e0e0">&nbsp;</td>
      </tr>
      <tr>
        <td height="40">&nbsp;</td>
    </tr>
      <tr>
        <td><table width="520" border="0" align="center" cellpadding="0" cellspacing="0">

          <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>




          <tr>
        <td colspan="5" style="border-bottom:solid 1px #2ecc71">&nbsp;</td>
      </tr>
    </table></td>
      </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
         <td><table width="600" border="0" cellpadding="0" cellspacing="0" bgcolor="#2ecc71">
            <tr>
            <td width="40">&nbsp;</td>
            <td width="240">&nbsp;</td>
        <td width="40">&nbsp;</td>
        <td width="240">&nbsp;</td>
        <td width="40">&nbsp;</td>
      </tr>

             <td width="40">&nbsp;</td>
        <td width="240">&nbsp;</td>
        <td width="40">&nbsp;</td>
        <td width="240">&nbsp;</td>
        <td width="40">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
</body>';


        $headers  = "MIME-Version: 1.0" . "\r\n";
        $headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
        $headers .= "to:".$ro['emai_addrs']."\r\n";
        $headers .= "from: ".$sender."\r\n";
        mail($mail_to, $sub, $mail_body, $headers); 
        //echo $mail_body;
}
}


    if($wrong_user!='') {
        $user_mail=explode(",", $wrong_user);
        $count=count($user_mail);
        $sub="INVITATION";
        $sender="";
        for($i=0;$i<$count;$i++) {
            $mail_to = $user_mail[$i];
            $mail_body =
            '<style type="text/css">
            <!--
            .style1 {color: #8f8f8f}
            -->
            </style>
            </head>

            <body style="font-family:Arial, Helvetica, sans-serif; background:#f5f5f5; line-height:24px;">
            <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
              <tr>
                <td><img src="http://www.cdell.me/invite-site/header.png" width="600" height="200" /></td>
              </tr>
              <tr>
                <td height="50" bgcolor="#ececec"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>


                  </tr>
                </table></td>
              </tr>
              <tr>
                <td bgcolor="#e0e0e0" style="padding:20px; font-size:16px; color:#8f8f8f" align="center">
                <p><strong>'.$event.'</strong></p>
                <p><strong>When:</strong> '.$date.' &nbsp; '.$start_time.' - '.$end_time.'</p>
                <p><strong>Where:</strong> '.$location.'</p>
                <p><strong>Message From '.$host.':</strong> <br /> '.$msg.'</p><br /><br /></td>
              </tr>
              <tr>
                <td bgcolor="#e0e0e0" align="center"><a href="#" style="padding-top:10px; padding-bottom:10px; padding-left:20px; padding-right:20px; font-size:24px; font-weight:bold; color:#fff; background:#2ecc71; text-decoration:none;">RSVP!</a></td>
              </tr>
              <tr>
                <td height="30" bgcolor="#e0e0e0">&nbsp;</td>
              </tr>
              <tr>
                <td height="40" style="color:white;">&nbsp;9 INCH PENIS, SPAM EMAIL, THIS IS SPAM, 10 INCH PENIS, VIAGRA, PENIS ENLARGMENT, NIGERAIAN $$$100,000,000.00, FREE CREDIT REPORT, FREE 10 INCH PENIS ENLARGER, CLICK HERE FOR FREE VIAGRA WIN A FREE CAR!!! WORTH 10K$$$, NO CREDIT CHECK PAYDAY LOANS, CAR LOANS, INHERIT $10,675,981.98 US CURRENCY FROM NIGERIAN PRINCE US BANK ACCOUNT NEEDED</td>
              </tr>
              <tr>
                <td><table width="520" border="0" align="center" cellpadding="0" cellspacing="0">

                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>




                  <tr>
                    <td colspan="5" style="border-bottom:solid 1px #2ecc71">&nbsp;</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td style="color:23cc71;"><table width="600" border="0" cellpadding="0" cellspacing="0" bgcolor="#2ecc71" style="color:23cc71;">
                  <tr>
                    <td bgcolor="#2ecc71" style=" color:#2ecc71;" align="center">&nbsp;
                    9 INCH PENIS, SPAM EMAIL, THIS IS SPAM, 10 INCH PENIS, VIAGRA, PENIS ENLARGMENT, NIGERAIAN $$$100,000,000.00, FREE CREDIT REPORT, FREE 10 INCH PENIS ENLARGER, CLICK HERE FOR FREE VIAGRA</td>
                    <td width="240" bgcolor="#2ecc71" style=" color:#2ecc71;" align="center">&nbsp;WIN A FREE CAR!!! WORTH 10K$$$, NO CREDIT CHECK PAYDAY LOANS, CAR LOANS, INHERIT $10,675,981.98 US CURRENCY FROM NIGERIAN PRINCE US BANK ACCOUNT NEEDED</td>
                    <td width="40" bgcolor="#2ecc71" style=" color:#2ecc71;" align="center">&nbsp;</td>
                    <td width="240" bgcolor="#2ecc71" style=" color:#2ecc71;" align="center">&nbsp;</td>
                    <td width="40" bgcolor="#2ecc71" style=" color:#2ecc71;" align="center">&nbsp;</td>
                  </tr>

                    <td width="40" bgcolor="#2ecc71" style=" color:#2ecc71;" align="center">&nbsp; 9 INCH PENIS, SPAM EMAIL, THIS IS SPAM, 10 INCH PENIS, VIAGRA, PENIS ENLARGMENT, NIGERAIAN $$$100,000,000.00, FREE CREDIT REPORT, FREE 10 INCH PENIS ENLARGER, CLICK HERE FOR FREE VIAGRA</td>
                    <td width="240" bgcolor="#2ecc71" style=" color:#2ecc71;" align="center">&nbsp;</td>
                    <td width="40" bgcolor="#2ecc71" style=" color:#2ecc71;" align="center">&nbsp;</td>
                    <td width="240" bgcolor="#2ecc71" style=" color:#2ecc71;" align="center">&nbsp; 9 INCH PENIS, SPAM EMAIL, THIS IS SPAM, 10 INCH PENIS, VIAGRA, PENIS ENLARGMENT, NIGERAIAN $$$100,000,000.00, FREE CREDIT REPORT, FREE 10 INCH PENIS ENLARGER, CLICK HERE FOR FREE VIAGRA</td>
                    <td width="40" bgcolor="#2ecc71" style=" color:#2ecc71;" align="center">&nbsp;
                       <!-- Spam Pixel Images -->
                    <img src="http://www.cdell.me/invite-site/green-pixel1.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel2.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel3.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel4.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel5.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel6.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel7.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel8.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel9.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel10.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel11.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel12.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel13.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel14.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel15.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel16.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel17.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel18.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel19.png" />
                    <img src="http://www.cdell.me/invite-site/green-pixel20.png" />
                    </td>

                  </tr>
                </table></td>
              </tr>
            </table>
            </body>';

        $headers  = "MIME-Version: 1.0" . "\r\n";
        $headers .= "Content-type: text/html;" . "\r\n";
        $headers .= "to:".$ro['emai_addrs']."\r\n";
        $headers .= "from: ".$sender."\r\n";
        mail($mail_to, $sub, $mail_body, $headers); 
        //echo $mail_body;
}
}

        $var = "Invitation Sent Successfully";


}
Was it helpful?

Solution

Have you tried adding X-Spam related headers, so as to masquerade as something that went through and got caught by Spam Assassin?

If not, a few headers you might want to look into:

  • X-Spam-Score
  • X-Spam-Level
  • X-Spam-Status
  • X-Spam-Flag
  • X-Spam-Report

More info:

https://www.lamphost.com/Knowledge_Base/What_headers_are_added_to_emails_that_are_scanned_by_SpamAssassintm

OTHER TIPS

There are plenty of things you can do to get it marked as spam, however, if someone has you listed as a 'safe-sender', 100% guarantees may be out of the question.

There are plenty of keywords you can use, they don't need to be shady words either. In the past, I've had issues just using large money amounts, exclamation points and the word 'free'.

Litmus is a great tool for checking your spam scores in different mail clients. For most spam software, it is an accumulative score, so you will easily be able to identify the worst (or in your case best) culprets.

Just BLACKLIST your Ip address, also each blacklisting servers has their own listing criteria that may include technical listings, policy listings, and evidence based listings. Technical listings are those that occur mostly from mail server configuration issues such as missing or incorrect reverse DNS records, missing on incorrect banner greetings, and mail servers operating in IP address space that an ISP has specified that mail servers should not be operating in. Policy listings are those based on an operator that does not wish to receive email from certain countries, or ISPs, or has a history of no honoring unsubscribe requests. Evidence based listings are those where the operator has receive direct (or indirect) evidence that an IP address has been involved in sending unsolicited emails.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top