Avoiding Php Mail() To Spam Boxes
I'm sending soliticited emails for a nonprofit and i'm finding when i use PHP's mail function, and the mail goes through my ISP's SMTP, a decent percentage of the mails go to people's spam boxes.
are there known headers or something i could add to my code to make them less spam box prone?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Using Mail() And Avoiding Spam Boxes !
Im using the mail() command to send an email to people who register on my site, but many are ending up in people's spam boxes on hotmail. This problem isn't true of all users - probably around 60%. Im being as open as possible using a number of headers, but can anyone suggest a way of getting through with less problems ? $sender = "From: Name <email@domain.com>" . ""; $sender .= "Return-Path: email@domain.com" . ""; $sender .= "MIME-Version: 1.0" . ""; $sender .= "Content-Type: text/plain; charset=iso-8859-1" . ""; $sender .= "Content-Transfer-Encoding: 8bit" . ""; $sender .= "X-Mailer: PHP/" . phpversion();
Avoiding Sent Mail To Spam?
Earlier this day i fixed my mail problem for account activation when someone registrates. I thougt that the mail() function didnt worked but instead it did worked by sending all the mails to my email spam. I've seen some code that avoids emails getting into spam.
Mail() / Sendmail Sending Mail As Spam
Wondering if anybody knows why when sending mail through my local sendmail program using the PHP mail() function; emails either do not reach the destination, or register as spam? Prime example is: h0tm@il addresses never receive the email, gmail addresses consider the email to be spam, and my workplace receive the email about 1 hour after the program finishes. Could it be a problem with my ISP? I am using Fedora Core 6, PHP 5 and Apache 2. Or test it yourself.. just fill out the form with some rubbish and it should send an email saying you've registered.. maybe you can figure out where I am going wrong by looking at the headers? http://aaronweb.no-ip.com:6969/?p=2
PHP Mail Flagged Aas SPAM
I am developing a web site using PHP that delivers several different email formats. I am testing with another server where the messages are sent and some of these messages (not all) will be flagged as SPAM. The headers are identical for those that work and those that don't only the body of the message is different. Can some give me some insite into this and what are my options to insere that various mail servers do not flag them as spam? I am using PHP Mail to create all of the messages. I've been doing a lot of Google searches but for some reason I'm not finding any solutions. Thanks, Vic
PHP Mail() And AOL Spam Filter
dodging AOL's spam filters when mail()ing from PHP? We are having trouble with this code: $fromEmail = 'aValidAddress@thisHostAccount.com' $headers = 'MIME-Version: 1.0' . " "; $headers .= 'Content-type: text/html; charset=iso-8859-1' . " "; $headers .= "From: This Foundation <$fromEmail> "; $headers .= "Reply-To: This Foundation <$fromEmail> "; $headers .= "Return-Path: $fromEmail "; $headers .= "Message-ID: <".time()." TheSystem@". $_SERVER['SERVER_NAME']."> "; $headers .= "X-Mailer: PHP v".phpversion()." "; mail($to, '$subject, $msg, $headers); We had originally been sending bounces to a different Return-Path address (see below) but simplified this after AOL flagged all the emails as spam. Also the To field is being set like this RealFirstName RealLastName <Addressand the message has a greeting using the RealFirstName. mail($to, '$subject, $msg, $headers, "-f bounce3@gnosports.com");
Php Mail Form And Spam
I have a feedback form on my site. People can fill the fields and message is sent to me using 'mail' function, after the form gets submitted (POST). The fields are subject, from and text. 'subject' is optional, others are mandatory. PHP script that handles the form input takes in account predefined field names only. The problem is that someone is sending me spam using that form. I don't believe that they target me specificaly. It is more likely that some automated robot is doing that. I tried to change field names, but still getting the messages. I checked the message source, and they are comming from the form. My question is how they can guess the field names and determine which mean what by automated process ? I guess they can parse html form to get names, but how they can put values in proper fields ? Are they using trial and error ? I should get messages with text in subject field, too, then, but I don't.
Mail() Detected As SPAM
I use mail() a lot for sending emails to customers but many customers don't receive my emails as they are considered SPAM emails. How to avoid this ? I've to say that my ISP is sometimes in the spamcop blacklist, but in this case I receive notifications from spamcop servers, but even when I don't receive such notifications, some customers don't receive my emails.
Mail() Php Blocked As Spam
I created a simple php mail() function with attach. The problem is that I´m receiving the mails as spam, I already tried everything, maybe somebody could give me a help, my headers: $remetente = "$nickuser"."@yachtbrasil.com.br"; $nome_resposta = "$nickuser"; $headers = "MIME-Version: 1.0".$eol; $headers .= "From: $nome_resposta <$remetente>".$eol; $headers .= "Reply-To: $nome_resposta <$remetente>".$eol; $headers .= "Return-Path: $nome_resposta <$remetente>".$eol; $headers .= "Content-type: multipart/mixed; boundary="$mime_boundary"".$eol; $headers .= "Message-ID: <".$now." TheSystem@".$_SERVER['SERVER_NAME'].">".$eol; $headers .= "X-Mailer: PHP v".phpversion().$eol;
Mail() Script Getting Filtered As Spam
Using PHP 4, I developed a form to be submitted and emailed. Our PHP server is internal. Our company uses Yahoo's Mailsender.net for email. The email never arrives to my Mailsender.net account. I am assuming it is filtered as 'spam'. I do not know how if I need the email header fields to have specific values to get by the Mailsender.net spam filters. Anyone have experience with this? I have tested my script and successfully sent emails to my Yahoo email account (I use for personal stuff). At first the emails were sent to my Bulk Mail folder (identified as spam for me to delete), but I made a couple modifications in the header fields and now the emails arrive in my Inbox folder.
Mail() Blocked By Spam Filter
I never had problem with this PHP page with mail() function with at least 5 different servers, but email sent through the server of this "T" company tends to get blocked by spam filters. I tested with my different email accounts and these are the results. * The mail is delivered to the "Inbox" of my AOL account. * The mail is delivered to the "Bulk Mail" folder of my hotmail and msn accounts. * The mail is delivered to the "Spam" folder of another account of mine. * The mail is not delivered to any of my two university accounts. One thing I noticed is that this "T" company hasn't setup the "From" section, unlike the other servers that I worked with before, so the mail is coming from "Nobody" <nobody@________>. I suggested the tech person of the company update the "php.ini" file, but he doesn't admit that's the issue. I tried manually adding the From with PHP coding with "$headers," but it didn't make any change.
Mail Arrives In Spam Folder
I have been trying to figure this out and have used 2 classes already, but still am unable to get this working. I'm trying to send an email verification link out to each user that registers on the site, but Gmail has been putting it in the spam folder. Here's a copy of the message: Code:
Mail() Function Is Being Labeled As Spam!
I'm in a rather desperate situation and need some help. I've recently started a PHP-based website that seems to be taking off quite a bit. It has a user registration process in which users confirm their accounts via an email. Currently, 25% of these emails are not delivered (or received), primarily to the following account types: *aol.com *aim.com *sbcglobal.com *comcast.net And occassionally Gmail and yahoo. The site uses mail() to send them out, but the mail relay server is the same one used by all other clients my hosting company has (GoDaddy). This means that when I send an email, it says the "From: " is the email address I choose, but the "Mailed-by:" says some nasty long name like "k2.smtp.secureserver.net" Some email recipients report no problems at all. I thought one way to solve the problem would be to use some kind of SMTP-authenticated class library such as PHPMailer. I used that, and it actually resulted in even more emails being labeled as spam. I'm really confused. Anyone know how to get around this issue? I've email GoDaddy plenty of times and they don't even bother responding.
Mail() Question, Helping Conform To Spam Filters
I am writing an application which shoots out confirmation emails to friends and contacts --- and looking at the Beta of Outlook 12 for Windows Vista, it looks like it catches this mail as Spam, where-as Outlook 2003 and others cleared them just fine. I am also having trouble with Yahoo as well. Yahoo and Outlook could just be too sensitive, but I am worried some of my mail may not be getting thru. This leads me to a question, what are the -basic- things I need in a mail() header - so I can feel confident they are all present and accounted for, and getting my most systems? There is an odd checkbox/feature in Outlook 12 - "When sending e-mail, Postmark the message to help e-mail clients distinguish regular e-mail from junk e-mail". Is this a technique that can be used in PHP, and has anyone had any success with it?
Company's Form Mail Script Jams To Spam Filter
I have a problem, because we have a simple script that sends mail from (our client) company's website to that company's boss. But just some days ago post stopped coming, suppose because that email provided he's using implemented more strong spam filter after some spamming attacks. Now that program in my opinion seems to think that our form mail is spammer! I suppose it must be about header information. How can I get our form working again? We only have used simple mail command with to, subject and message - no additional headers. But now? ************************* Here is docs from php site, so you dont have to find them :-) Example 2. Sending mail with extra headers. <?php mail("nobody@example.com", "the subject", $message, "From: webmaster@{$_SERVER['SERVER_NAME']} " . "Reply-To: webmaster@{$_SERVER['SERVER_NAME']} " . "X-Mailer: PHP/" . phpversion()); ?> The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option. You may need to add the user that your web server runs as to your sendmail configuration to prevent a 'X-Warning' header from being added to the message when you set the envelope sender using this method. Example 3. Sending mail with extra headers and setting an additional command line parameter. <?php mail("nobody@example.com", "the subject", $message, "From: webmaster@{$_SERVER['SERVER_NAME']}", "-fwebmaster@{$_SERVER['SERVER_NAME']}"); ?>
Avoiding Load Time?
I have a script that takes quite a long time to load since the PHP is processing quite a lot of info. Is there any way I can initiate the script, then have it move on to another page right away so I don't have to wait for the PHP to finish processing? (having ignore_user_abort(); on so it will continue to process in the "background" - if my thinking is correct...)
Avoiding Duplicate Results??
Does anyone know if this is possible: I'm running a query against a db and am pulling name and ticket # (for a helpdesk)... What I'd like to do is take the results from the "Name" field, but only show EACH NAME ONCE in a table. For example, I might get 200 results back, but only want to show the name of the person once, with how many tickets they have assigned to them. So it would look like this: ___Name___|___Number of tickets___ ___Bob____|__________3__________ ___John____|_________23__________ ___Mark____|_________4___________ ...etc, etc... does anyone know how to go about starting this? I'm assuming an array of sorts.
Writing A Review App But Avoiding Spamming
I want to write a revie module for some listings I have but I can imagine people posting 100s of times to say how great they are and 100s of times to slate their competitors. I figure only allowing one review per listing from a particular IP address is a good start any other suggestions?
Avoiding Duplicate Array Elements
Im having a problem with this code. Im trying to remove duplicate elements from an array created via $_GET. I want users to be able to click on a link which sends an email address to an array. I just want to remove duplicate email addresses from the array. Ive tried array_unique() on my test server but it doesnt work. So i tried to remove duplicates myself before storing them into the array. The script works great without the checking, session_start(); $email = $HTTP_GET_VARS['email']; if (isset($_SESSION['Array'])) { $Array = $_SESSION['Array']; $numElements = count($Array); for($counter=0; $counter < $numElements; $counter++) { /* Problem is here */if ($Array[$counter] == $email) { exit(); } else { array_push($_SESSION['Array'],$email); $EmailArray = $_SESSION['Array']; $_SESSION['Array'] = $EmailArray; } } } else { $EmailArray = array(); array_push($EmailArray,$email); $_SESSION['Array'] = $EmailArray; }
Avoiding Endless Conditional Statements
Here is my problem. I want to make a webapp that will basically take the work out of finding what tool works for what situation. There are 5 factors that go into tool selection. 1)Material Group, 2)Insert Radius, 3)Insert Type and Size, and 2 others that I can't remember off-hand. There are probably about 1000 different scenarios that I have to code for..(there are several blank table cells and it's not setup as you might imagine, there is a lot of overlapping), and I desperately want to avoid making a gigantic conditional statement. I'm afraid that I really have to provide a picture of what I'm doing here, so I will do that. Here is the link. You only see 3 of the 5 factors on this page, and the other 2 have to do with whether this table or one of many other tables (not pictured) will be used. So, now that I've confused everyone. That's my table. What's a good way to go about programming that sucker in so that people don't have to do all the "work" involved to figure out what tools they need. They should just be able to choose selections from 5 dropdown boxes and get one tool back. A tool is something like "10.655.600".
PHP File Writing And Avoiding A Race Condition
So, PHP has this issue where you cannot lock a file until you open it, which leaves the door open for a race condition when writing files. I wrote the following code a while back and think it should work (and in fact use it and it works), I just thought I'd post it here for an audit and in case it might be useful for someone to use or I missed something! /** * Write a file to the server. * * First open a temp file for writing and acquire a lock. * Proceed to write, unlock and copy the file from a temp file. If the * file size is the same, the write worked, clean up and go home. if * not, clean up and hope it works the next time. */ function cms_writeFile($filename, $tempfile, $data) { $ft = fopen($tempfile, 'w'); if(flock($ft, LOCK_EX)) { fwrite($ft, $data); flock($ft, LOCK_UN); fclose($ft); if(copy($tempfile, $filename) && filesize($tempfile) == filesize($filename)) { unlink($tempfile); return true; } else { // The whole process failed. unlink($tempfile); unlink($filename); return false; } } else return false; } I pass it a random tempfile name, so at that point I think we avoid any race condition issues, but to be paranoid I check the file size after the copy. If the files are of a different size, I drop them both and hope this works the next time. An example to use the function: if(cms_writeFile('test.php', 'randomg-temp.php', 'some data')) { echo 'written' } else { echo 'notwritten' } Seems right, and it works, am I missing anything?
Is Spam Getting Through
I have been receiving these e-mails but have security on the PHP form, however I would like to know if these messages are getting through to their intended places or does my security work. I am particulary worried about the reference to BCC because that is not part of the form. MORE IMPORTANTLY: How can I read this e-mail and know either I have stopped it or I haven't? I would be thankful to any help [color=blue][color=green][color=darkred] >>>>[/color][/color][/color
Odd Spam (slightly OT)
I have a php contact form on a page that I manage which is receiving replies such as the following: Comments: Hello dear webmaster. I found your site via google and i like it very much. cia!! Subject: General query Name: Senrde Email: Snosjk@hotmail.com Sent from IP: 203.162.27.93 Comments: i thinks you made i great web resource Subject: General query Name: Dansiz Email: sdegnu@hotmail.com Sent from IP: 204.174.87.210 Comments: Hi. dear webmaster i like your site. Subject: General query Name: Densdly Email: dedlsa@hotmail.com Sent from IP: 203.162.27.90 The comments line seems to come from a bank of about 5-10 but the names and email addresses seem to be randomly generated. But what's bugging me is why someone is doing this? It's not vast numbers, about 8 yesterday. IP addresses vary, Vietnam, and Japan appear quite a bit but I've also had one from the UK. There doesn't seem to be any payload,
Phpmailer And Spam
I'm using phpmailer class (http://phpmailer.sourceforge.net) to send mails from my site, but i can't figure out why those mails are seen as spam by yahoo and hotmail. Gmail seems to look them better and allows them to stay in "inbox" folder. Are there any thing I can do about that?
Captcha And Spam
I have a simple guestbook up, and have implemented a captcha area to try to lessen the amount of spam. I have also banned a list of about 400 IP addresses known to be open proxies, or spam originators. But *still* i get a few a day and it's getting tiresome. Is there something i am not doing right from a server side if they are somehow able to get around the captcha thing? (it works correctly, have tested) I thought that really could tell computers and humans apart.
Spam Flagging
I have a website where users submit anonymous messages, which are automatically posted publically on a rolling list. I am trying to implement a community flagging/voting system so users can eliminate spam messages themselves. I would like a flag icon to pop up next to each submission, and for entries to be deleted from the database (or at least not displayed) after 3 user flags. Code:
Email Spam
i am using the following code to send form content to my email address. I am having problems with spam. What can I do to fix this problem. Code:
Anti-Spam Key
Can someone point me in the direction fo a good anti-spam key script?
Spam Filter
anyone know a good spam filter for my linux email box...
Check Boxes
I have a very little problem with check boxes. How can I write a simple PHP code to tell me when a check box has been checked, and then use the name of the checkbox in a function.
Reading POP Boxes
I've been looking round for something that will read the contents of a pop box and populate a MySQL table. The e-mails will all be of a fixed format and include a jpeg as an attachment. I need to put the following columns in: sender subject body filename (possibly appended to the date to mitigate the risk of The script would also need to save the attachment to a predetermined folder. Does anyone know of anything that would do this? Alternatively, how much would it cost for someone to get this working for me?
Alert Boxes
do u know the alert box in javascript? when u write alert("somthing"); well i need that in php what is the alternative function for that in php?
Spam Block On Form..?
Anyone know about a EASY thing to do with my Form to make people only submit once with cookies?
Contact Form Spam - To Me Alone
I have a contact form on my site (been there for a few years) and just lately someone has begun using it to send Spam to me - and only to me (one to three times a day). I can tell because I track the usage of those contact form scripts (that I wrote) closely. The person is not even trying to inject anything into the headers, they are just sending me URLs to their porn sites. Is there any way to block this kind of usage? I've tried the usual tricks (hidden form field - checking referrer), but they always (almost) check out okay. The originating IP address changes every time, of course - and the porn sites are usually already gone. I'm already cleaning all my form variables (checking for LF and CR and content_type and cc:), so that is not my problem. It's just the few annoying emails I get. [ ..... Is this actually a productive way for spammers to distribute their crap ... one email per form?]
Keeping Spam Bots Out
Is there a PHP-way of entering an email address on a .php webpage (as in "If you need info, email us at URL") with this address as a mailto link yet is NOT readable by spam bots who visit the site? I've searched the forum and found lots of "spam' references, but none of them talked about how to obfuscate a regular mailto link.
Form Spam Prevention
I'm looking to set up a jobsboard on my website and have bought a script to handle the applications through a form. The script prevent the form being hijacked for bulk email but there's nothing to stop robots making repetitive spam postings unless I insert a captcha code which will obviously slow down users. So the question is if i don't use a captcha code do you think there's much of a risk of having spam through these forms? I've noticed kijiji.com requires captchas on its advert reply form but totaljobs.com (a large jobsboard in the UK) doesn't use captchas - how do they prevent spam problems or do you think they accept a small amount of spam will happen and think its not worth inconviniencing users with captchas to prevent the spam?
JS Redirect Spam Blocking
Basically I run a blog site with templates that I like users to have full control of. Unfortunately there are those spammers that like to throw in a javascript redirect. The normal ways of checking are currently hardcoded in my DB but I did not have a way of checking when they put them into variables or included them as a .js file inside the script. This script will build the variables and or find the the url that the script is linked to and check the contents, if that script re-directs it will check the contents of the next until no more scripts are there to check or it finds a re-direct keyword. This worked on my 5 tests outlined below, but yea. Code:
Combo Boxes Question
I am wondering how I can make the whole array appear in the code that is below with the database entry to be selected. At the moment it just displays the database entry.
Populating Two Combo Boxes
I have one combo box (Category) which is populated by a MySQL table using php. I am trying to use the onchange javascript to submit the value selected so that I can populate the other combo box (sub-category) based on what was previously choosen. So can anybody give me a clue on how to submit the first boxes value so that the second can see what was selected (javascript function).
An Array Of Text Boxes
I have the full code in a php script where I essentially display a form with checkboxes, and 2 text boxes associated with each checkbox to record grades ( marks and remarks ). The form displays correctly and the checkboxes I select do pass the correct id numbers for the students to be graded, also the numeric data in the first textbox is correctly transmitted HOWEVER the data in the second textbox gets randomly truncated. e.g, if the "remarks" textbox has 'hello', it gets truncated to 'o'. It seems I'm not resetting something or there is another simple oversight somewhere, perhaps the script treating the data as a string rather than as an array Code:
Multiple Drop Down Boxes
I want to create two multiple drop down boxes, the first will display all the company names, once this has been selected all the stock information for that company will appear in the second drop down boxes.
Dynamic Combo Boxes
i have a problem with creating some dynamic combo boxes. i have a form and the user enters the number of printers required, on the recieving page i display that many combo boxes ready for their input...but the problem is its not generating the correct number of combo boxes for some reason. i think i'ts because i need to reset the cursor on the result set so it can whip through the printers again but am not sure. please see following code:
Printing Colored Css-boxes
I've got a page with a couple of tables inside a couple of colored boxes(css-style), but when I try to print the page I end up with a copy without colors.
Form Drop Down Boxes
I have a bunch of products i want to add to a database, i have a form to submit the products to the database. What i need to crack is to have a drop down box for category 1 (beer or wine) and then automatically populate the drop down box for category 2 depending on the first selection if cat1 = beer then cat2 options = Lager, Malt, Stout. if cat2 = Stout then cat3 = Guiness, london, Old boot. if cat3 = Guiness then cat4 = Bottle, Can. I have four sub categories so need this to work on the fly before adding all info to the database ...
Conditional List Boxes
I am attempting to create a list box that is dynamically populated based on the selection of another list box. I am in way over my head..only way to learn I guess. The code below has a year listbox and then based on the year selection, the page should either show another listbox (show industry selection when year <> 2005) or it should render the main form (when year=2005). I cannot get the main form to appear. Code:
If Statement And Check Boxes.
I have a database full of different articles/stories. I would like to have a publish check box so that if it is checked, that story appears on the homepage, I know how to do this. HOWEVER, i need ot be able to limit this so that only one can ever be checked off... Code:
|