Triggering GPIO of a ESP8266 webserver from another ESP8266

I couldn’t get the webserver and mailserver to work together on the same ESP. I’m sure it’s possible but with my limited coding knowledge that’s the best I could do right now to get the same results.