tedious / Fetch

An IMAP library for PHP

Home Page:http://www.tedivm.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use secondary interface when making requests to the IMAP

skynet opened this issue · comments

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 ...

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.

Yes, ip route seems to be an option.