tedious / Fetch

An IMAP library for PHP
http://www.tedivm.com
Other
503 stars 158 forks source link

Use secondary interface when making requests to the IMAP #138

Closed skynet closed 9 years ago

skynet commented 9 years ago

I want to use a secondary interface with a different IP when making requests to the IMAP server. How do I accomplish that?

With curl is as easy as setting up a flag:

curl_setopt($curlh, CURLOPT_INTERFACE, "xxx.xxx.xxx.xxx");

For imap the only remaining option is to bind php to a different interface, which is also a pain ...

tedivm commented 9 years ago

I think you're going to need to handle this on the operating system level, as I don't see anything in the imap extension that can handle this.

skynet commented 9 years ago

Yes, ip route seems to be an option.