My ISP have blocked port 25 for sending mails from PHP, and instead have allowed port 587 or 465 to be used. how do i force php mail function to use port 587 instead of defa
You can edit your php.ini file (if you have access) and set smtp_port = 587 or in your code, ini_set('smtp_port', 587).
smtp_port = 587
ini_set('smtp_port', 587)