Page 1 of 1

phpSUexec and an external mail server.

Posted: Fri May 11, 2007 11:12 am
by Plasmator
I've been using swift for a while now, and I love it. It's great.

However, My host limits the number of emails I can send per hour, and I have a ticket/waiting list application that recently got more members than my limit, which means I have to queue and batch send the messages. No big deal, I wrote a script for it, it works fine.

Still, I'd like to send the messages out all at once, which should be easy with an external SMTP server, but I get the following error when I specify an external mail server.

Uncaught Error of type [Swift_Connection_Exception] with message [The SMTP connection failed to start [(SMTP server redacted):25]: fsockopen returned Error Number 111 and Error String 'Connection refused']

The best reply I've gotten from support is: "the problem is the server is not letting you create sockets...server use phpSUexec, so you will need to code it accordingly"

So, my question is:

Has anyone got a way to get swiftmailer to use an external smtp server if the server hosting swift has phpSUexec enabled?

Thanks for any help,

!Bob

Posted: Fri May 11, 2007 1:30 pm
by Chris Corbyn
I don't think it's to do with suExec. It's more likely that your host has firewall rules in place to prevent people connecting to services outside their network. If it is to do with suExec I'd be interested to know more since I've never heard of such issues with it :)

I'm guessing you're on a low-end shared host judging by the limits on the emails and the issues getting out of the network. Who is your host? I may be able to tell you if I already know it doesn't work :)

Posted: Fri May 11, 2007 5:40 pm
by Plasmator
d11wtq wrote: I'm guessing you're on a low-end shared host judging by the limits on the emails and the issues getting out of the network. Who is your host? I may be able to tell you if I already know it doesn't work :)
Sure.

The (indeed, low-end and shared) host is webhostingbuzz.

The price was right, but the somewhat recent addition of email limiting has definitely made me less inclined to stay. It's just a pain to try to transfer 12+ domains, 30+ databases, etc.

Posted: Sun May 13, 2007 6:21 am
by Chris Corbyn
Limiting emails per hour is extremely common with shared hosts. Unfortunately shared hosts ride misfortune of having spammers hop from host to host until the host appears in blacklists and is no use to them anymore. Limitng the number of emails per hours helps the host to deter such behaviour because a spammer cannot spam much with this kind of restriction. Of course, having a VDS (not drastically more expensive than shared hosting) with your own root access and IP address solves this.