The iPhone enables users to connect to the Internet through a variety of applications, from the Safari browser to Mac Mail. When you're connected to a Wi-Fi, 3G/4G or Edge network but get the "Cannot Connect to Server" message, it usually indicates a problem with the phone settings. Most connection problems can be resolved quickly without costly Apple support.
If the iPhone displays a "Cannot Connect to the Server" error message when you're sending an email with the Mail app, it's usually due to the outgoing mail server settings. If you've changed your password or just set up the account, the outgoing server field is easy to miss; without it, you can receive mail but not send it. In the General Settings panel, choose "Mail, Contacts, Calendars" and tap the account you want to use. The incoming mail server password area is immediately visible. Touch the email address and look for the "SMTP" field in the Outgoing Mail Server pane. Tap the option under the Primary Server and enter your login information.
The iPhone requires a signal to connect to the Internet. If you have the correct login information for a wireless network, you'll see the signal icon next to the carrier name on the upper left of the screen. A connection error when you have a full signal usually indicates a problem with the router due to corrupt settings or a temporary outage. On your own wireless network, the quickest solution is to reset the router by unplugging all of the cables, waiting a few minutes and plugging them in again. For public networks, the network administrator is responsible for handling router problems.
The iPhone allows you to set network preferences to control which networks it uses. If the phone settings become scrambled or changed accidentally, you may not be able to use Internet applications even if you have a Wi-Fi, 3G/4G or Edge signal. Resetting the network settings can solve the problem. In the Settings panel, go to "General' and 'Reset' and choose "Reset Network Settings." If the problem isn't immediately resolved, turn the phone off and back on to help it recognize the change.
Occasionally, the iPhone sees the network but refuses the server connection. When this happens, toggling between connection types can help the phone reset and reconnect. If you're using a wireless network, turning the Wi-Fi function on and off in the Settings menu may work. For 3G/4G and Edge, go into the Settings menu, turn on Airplane Mode, wait a minute and turn it off again. Assuming that there is no problem with your login credentials or the network itself, the connection will usually work when your phone reconnects to the preferred network.