php mail() to junk mail

They have: 12 posts

Joined: Feb 2005

Here is my mail function:

mail($email, $subject, $message, "From:$first_name_input $last_name_input <$email_input>\r\nReply-To: $email_input")

It sends all mail to my junk mail folder, please tell me why. What do i need to correct in that function to send to the inbox.

Thanks.

AB Solutions - Web Design Solutions

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

What is the subject and body of your message? If you want, send me one at [[email protected]][email protected][/email]. The spam software I am using tells details on how it got it's spam score.

Here is an example of a header from some spam I got, it shows the tests this one triggered:

Quote: X-Spam-Filtered: 10b572692392670a9c5b7f24a49f6678

X-Spam-Status: Yes, hits=12.9 required=4.0 tests= MIME_HTML_ONLY,
FORGED_RCVD_NET_HELO,
NORMAL_HTTP_TO_IP,
RCVD_NUMERIC_HELO,
HTML_LINK_CLICK_HERE,
OBFUSCATING_COMMENT,
BAYES_00,
HTML_TAG_BALANCE_A,
HTML_MESSAGE,
HTML_60_70,
HTML_FONTCOLOR_UNSAFE,
HIDE_WIN_STATUS,
HTML_COMMENT_SAVED_URL,
MIME_BASE64_ILLEGAL,
MIME_HTML_ONLY_MULTI,
CLICK_BELOW,
MIME_BASE64_TEXT

X-Spam-Flag: YES

X-Spam-Level: ************

Additionally, the following link is for the FAQ for SpamAssasin (which produced the above) for how to avoid getting triggered.

http://wiki.apache.org/spamassassin/AvoidingFpsForSenders

Different programs trigger on different things. ie. I also have spam checking on my virus software. So I get some messages with the subject marked **JUNK** (Spam assasin) and some marked SPAM: (AV software). Needless to say, those that come is as SPAM: **JUNK** I set to automatially delete, since ti triggered both of them.

-Greg

They have: 12 posts

Joined: Feb 2005

Well here is the form link: http://absolutions.ssxh.net/contactus.php

Basically it allows surfers to contact me on my hotmail address. The message format is something like this:
First name: ***
Last Name: ***
E-mail: ***
Company: ***
Country: ***
Message:
***

The *** are the things the user inputs. I tried entering different things, but it keeps sending to junk mail. I'll try sending something to your e-mail using that form. Smiling

AB Solutions - Web Design Solutions

They have: 12 posts

Joined: Feb 2005

One more question. If the user types in quotations " or ' in the message field, each quotation is followed by a \... any idea why?

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

I got your test message, it come in looking (in part) like this:

Quote: To: testmail@[outdated_domain]
Subject: Test Mail
MIME-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
From: [removed]
Reply-To: [removed]
X-Priority: 3
X-MSMail-Priority: High
X-Mailer: [removed]
Message-Id:
Date: Sat, 19 Feb 2005 14:45:53 -0600
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - [removed]
X-AntiAbuse: Original Domain - [outdated_domain]
X-AntiAbuse: Originator/Caller UID/GID - [99 32003] / [47 12]
X-AntiAbuse: Sender Address Domain - hotmail.com
X-Source:
X-Source-Args: /usr/local/apache/bin/httpd -DSSL
X-Source-Dir: absolutions.ssxh.net:/public_html
X-Spam-Filtered: 10b572692392670a9c5b7f24a49f6678
X-Spam-Status: No, hits=1.3 required=4.0 tests=MISSING_OUTLOOK_NAME,
RATWARE_HASH_2_V2,
MISSING_MIMEOLE,
FORGED_HOTMAIL_RCVD2,
BAYES_00,
X_MSMAIL_PRIORITY_HIGH
X-Spam-Flag: NO
X-Spam-Level: *

Company: AB Solutions
First Name: [removed]
Last Name: [removed]
Country: Canada
Message:
I\'m petachok from Webmaster forums, just trying to send a test mail as you said to do in the \"php mail() to junk mail\" thread.
Thanks for your help. Smiling

(Note the backslashes are displaying...)

Anyhow, for me it didn't come in as junk. Now that I know you are using Hotmail, I would recommend you go in there and check your settings. I just went in there and see they have one level for junk mail that will mark any mail that is not on your specified list to receive.

I would recommend going into OPTIONS->MAIL->CUSTOM FILTERS to create a new filter that takes mail with whatever subject you are placing in the message, and put in into a specific folder. I would guess this would override the junk mail filters they have built in.

Even if this wasn't a problem with junk mail, it is best to use filters like this so you always have the same type of message in one place, and can tell by looking at your folders when you have a new message. It won't be mixed in with all your other emails.

-Greg

Busy's picture

He has: 6,151 posts

Joined: May 2001

stripslashes($message)

could be the first/last name in From that is catching the filters

They have: 12 posts

Joined: Feb 2005

Ok thanks so much guys. The stripslashes thing works, and I setup a new filter that said if a message has "AB Solutions: " in the subject, then it will be sent to the AB Solutions folder, and it it actually works.

AB Solutions - Web Design Solutions

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.