-2

My server has 2 IPs.

Whenever I send an email in php using mail() the IP used to send the email is IP A. However, I'd like to use IP B.

Is this possible?

If yes, is this possible using mail() ?

If yes, how?

Lemures
  • 474
  • 5
  • 11
  • I think the scenario of my question is a little different form the question which this was marked a duplicate of (or at least more specific) – Lemures May 09 '18 at 08:07

1 Answers1

0

No, that is not possible: unless you are using a SMTP server, your own server (so the one running your PHP script) is used to send mails. And if that server is configured to use IP A, your mail is sent through that IP.

Nico Haase
  • 11,420
  • 35
  • 43
  • 69