Hotmail won't accept my emails. This is getting quite annoying. The script will send emails to my other private email address not hosted by hotmail. Anyone see anything wrong?
They'll be getting blocked as spam by Hotmails strong junk filters.
If you have PHP5, try the new release candidate - mesages are a little more compliant, although it you're only sending ascii text it won't make a difference. Things that could be causing junk detection:
Short messages - as in, one sentence.
HTML-only messages -NEVER send a HTML message without sending the same content in plain-text. It gets points against it even in forgiving in spam checkers.
Untrusted hosts
Lack of SPF Record*** <---- Practically vital with hotmail
RBL listings - check all hosts the message goes through here
Hotmail shouldn't actually not accept the emails should it? I've checked junk mail folders and the emails don't even appear in there. I've added the sending email address to the safelist and that didn't help
Did you check those links I posted? I'd almost bet that if you tried sending from PHPMailer or SquirellMail on the same server you'd not be able to send to Hotmail neither. The only way I've seen people fix this is to add a SPF record to their server because the first thing hotmail does is looks for a SPF record.
I don't think its that though because I have successfully sent several emails before using the above script. The only problem is I made some changes and I'm not sure what changes I made but it quit working.
Is there anything else it might be? If not I'll try to figure out this SPF thing. This isn't a large project so I don't want to go about changing a bunch of server settings.
From: proudly_canadian01@hotmail.com
Reply-To:
Subject: Here is the super important email!
Date: Fri, 9 Feb 2007 21:13:40 -0600
X-Mailer: Swift 2.1.6 by Chris Corbyn
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="_=_swift-1785645cd3860eb7158.52947666"
Content-Transfer-Encoding: 8bit
This part of the E-mail should never be seen. If you are reading this, consider upgrading your e-mail client to a MIME-compatible client. --_=_swift-1785645cd3860eb7158.52947666
Content-Type: multipart/alternative; boundary="_=_swift-2533745cd3860eb7359.37314129"
--_=_swift-2533745cd3860eb7359.37314129
Content-Type: text/html; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 8bit
This is my super special email.
--_=_swift-2533745cd3860eb7359.37314129--
--_=_swift-1785645cd3860eb7158.52947666--
It's missing all the blank lines between the MIME parts
From: proudly_canadian01@hotmail.com
Reply-To:
Subject: Here is the super important email!
Date: Fri, 9 Feb 2007 21:13:40 -0600
X-Mailer: Swift 2.1.6 by Chris Corbyn
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="_=_swift-1785645cd3860eb7158.52947666"
Content-Transfer-Encoding: 8bit
This part of the E-mail should never be seen. If you are reading this, consider upgrading your e-mail client to a MIME-compatible client.
--_=_swift-1785645cd3860eb7158.52947666
Content-Type: multipart/alternative; boundary="_=_swift-2533745cd3860eb7359.37314129"
--_=_swift-2533745cd3860eb7359.37314129
Content-Type: text/html; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 8bit
This is my super special email.
--_=_swift-2533745cd3860eb7359.37314129--
--_=_swift-1785645cd3860eb7158.52947666--
There are consistently CRLF sequences missing from all the inner boundaries. I don't recall that ever being a bug in the library, however, I do notice you're on 2.1.6. Get 2.1.17, it's been out since October and is very stable. You can just overwrite your existing library with the updated one.
That did the trick. I have been working at this for several weeks. I remember looking through the files at one point in time trying to find a way to simplify it all. I may have accidentally deleted too much at one point in time.
Web Dummy wrote:That did the trick. I have been working at this for several weeks. I remember looking through the files at one point in time trying to find a way to simplify it all. I may have accidentally deleted too much at one point in time.
Its all working good now.
This would not only be prevented, but also the main point of unit testing, would it not?
(not an attack, but a legitimate question, as I try to wrap my head around the bloody thing)
This is a little frustrating... It quite working again today after sending about 10 emails... It's still having now problem sending them to my local private email address though.
Are you trying to send many emails (more than 10, say) through the SMTP server in one go? Many servers are configured to accept no more than 10 FROM envelopes in one session. Sending 10 emails with Swift (by default) is not the same as sending one email to ten recipients in thunderbird or other mail client since swift rewrites the email for each recipient so that only their address appears in the headers.
Could you send a copy of the email in question to chris@w3style.co.uk? What sort of content do the emails have? Are you sending plain AND html parts?
If you're allowing users to specify any To: address, you essentially have an open relay for spammers to use. I hope you have some mechanism in place to keep the bots away.