Click to See Complete Forum and Search --> : Formmail Some Emails Work, Some Don't


CookieDog
12-07-2004, 04:50 PM
I am using Matt's Formmail Script, and have had it running successfully for a while, but all of a sudden it stopped emailing to certain email addresses, but other email addresses receive it just fine. The script is working, and writing to a text file, sending an attached file via MIME::Lite, and redirecting successfully to my "thank you" page. For those emails getting the form, the attachment is there, and working correctly.

It seems that the email addresses NOT working, are corporate ones, including any from the same domain where the script & html form reside, and another company. The ones working are yahoo, msn.com, comcast.net email addresses.

I thought maybe it was a spam filtering issue, but we still get those emails in a spam inbox, and nothing is coming through at all.

I also heard that if your company, or even your web host company, is put on the Black Hole List for spamming, that this may affect it, but my web host said they don't think that is the problem.

The web host recently did some major overhauls on the server, but they can't seem to tell me if there is some kind of additional security or restrictions in place that would be blocking these emails from their end. All signs point to the web host blocking certain emails for some reason because the script otherwise seems to work. All they could tell me was to doublecheck my email addresses (duh - first thing I did), and re-type them and re-upload the script again, which I did, but it didn't help.

Here is the part of the perl script where my email addresses are. I'm using numbers in my html form that are used to assign the actual email addresses when the form gets parsed. I've confirmed that all the email addresses are correct, and working, but I've changed them here, so these are not real email addresses.


@referers = ('domain.com');

@recipients = (&fill_recipients('domain.com'),'^someone\@comcast\.net','^anyone_else\@yahoo\.com','^info\@other_comp any\.com');

$sendTo1 = "jdoe\@domain\.com,jjohnson\@domain\.com,anyone_else\@yahoo\.com";
$sendTo2 = "jdoe\@domain\.com,someone\@comcast\.net,info\@other_company\.com";

###Lot's of code missing in between here, just giving what I think ##
###are the relevant bits pertaining to the email addresses ##

# Within the 'sub parse_form' function
# "If" statement to check for the 'recipient' field
# and assign email addresses based on number values.
if ($name eq 'recipient') {
if ($value eq '1') {
$value = $sendTo1;
}
if ($value eq '2') {
$value = $sendTo2;
}
}


The form is successfully emailed and received at these addresses:
someone@comcast.net
anyone_else@yahoo.com

These email addresses receive nothing (the cgi script and html form are both on the domain.com server):
jdoe@domain.com
jjohnson@domain.com
info@other_company.com

Let me know if you think any other parts of the code could be helpful, and I'll post them. Thanks for any help - this is really been a huge problem.

P.S. I do have the '@' and '.' symbols escaped with '\' in the code, but it disappears when I post it here.

Nedals
12-08-2004, 07:16 PM
Originally posted by CookieDog
@recipients = (&fill_recipients('domain.com'), '^someone\@comcast\.net', '^anyone_else\@yahoo\.com', '^info\@other_company\.com');

Just a little confused but...
What's the '^' used for and, if required, did you include it in your '&fill_recipients' sub?

CookieDog
12-09-2004, 08:14 AM
Hmmmm... Not sure what you're confused about?

The '^' is from regular expressions, meaning "beginning of string", and is used for matching those email strings exactly, as opposed to including all email addresses at that domain.

What would you suggest needs to be included in the '&fill_recipients' sub, and why?

Nedals
12-09-2004, 12:55 PM
The reason I commented on the '^' was simply a guess.
You may have been doing something with the '@recipients' array that somehow used the '^' and that had not been included in the email address produced by the '&fill_recipients' sub, which (again a guess) is used to build the email addresses for 'domain.com' and which are not working.

I suggest to add a temporary print statement just before the 'email function' to check that the email addresses are what you expect them to be.

CookieDog
12-09-2004, 04:35 PM
Thanks for your comments. I had already checked the output of the email addresses and they come out correct.

All email addresses (those working and not working), show up in the "To:" list on the email as well (when I get the email in one of the inboxes that is receiving the form).

And the '^' previously worked just fine to both 'domain' and non-domain email addresses, so I don't think that is the problem (although you never know!).

I'm thinking that it has something to do with the web host blocking the email, but they can't seem to give me any answers. Do you have any suggestions as to what the right questions to ask them would be?

Or anything else?

VoytekG
12-16-2004, 10:13 PM
Hi!

I had the same problem once and it was because I was using Tripod's server. They only allow 200 e-mails to be sent a day, and my e-mails would only send if I used the CGI script every couple of minutes. Maybe your server is similar.

Thanks,
Wojciech

CookieDog
12-21-2004, 04:52 PM
VoytekG, thanks for your comment, but I don't have that kind of restriction on my server, so that's not the problem.

I have found out some more information though. The client I'm working for has a separate internal email server, from the web site host server, so the problem might have to do with the email not being routing to the right server.

Does anyone know of this being a problem, and how to fix it?

Would I possibly have to reference the different IP address or name of the separate email server somewhere in my cgi script? And if so, where and how?

Thanks for any further advice.

compbrat75
12-21-2004, 07:09 PM
Hi cookiedog,

A couple of things you could check.

What email address is listed for the ‘Return-Path’ and what is the email address listed for the ‘From’ of the email that is being generated? Are these both valid email addresses on the server? Can see the RFC failure code on one of the returned emails? You can have the email generated by the script go to one of the email addresses that you know does not work and compare the failure codes to see if it is a consistent failure. It is most likely not the script if it has not changed. Chances are, the problem lies with the ever-changing quest for the ultimate spam blockage.

I work for subsidy of a large corporation. One day the emails that I sent out for my company stopped coming to my own inbox. It turns out that, even though we were CAN SPAM compliant, they flagged that sender address as scoring too high on the spam scale. Therefore, anything from that address regardless of volume was marked as spam. I looked back over my returned mail logs and found that my RFC failure codes were similar on other addresses as for my work's address failure code.

Here is a great link that explains the RFC returned codes.
http://www.cse.ohio-state.edu/cgi-bin/rfc/rfc1893.html

Hope this helps.
compbrat75 :)