Gmail ошибка сервера connection refused

Cправка — Gmail

Войти

Справка Google

  • Справочный центр
  • Сообщество
  • Gmail
  • Политика конфиденциальности
  • Условия предоставления услуг
  • Отправить отзыв

Тема отзыва

Информация в текущем разделе Справочного центра

Общие впечатления о Справочном центре Google

  • Справочный центр
  • Сообщество
  • Раньше не работали с интегрированным сервисом Gmail?

Gmail

Do you want to run another email under the Gmail account?

Luckily, it is possible to add another Email Address to Gmail Using POP3.

However, it does not work always and may show some errors like “server returned error: “Connection timed out.”

Moreover, this may happen due to the incorrect server name or the port number used in server-wide mail settings.

At Bobcares, we often get requests from our customers to fix the Gmail pop3 connection refused as part of our Server Management Services.

Today, let’s get into the details on how our Support Engineers fix the Gmail pop3 connection refused error.

How to add another Email address to Gmail

Sometimes, many customers want to manage another account under Gmail’s roof. Also, they need to send and receive the email through the remote server too.

To add an email account to send and receive emails from that address, we use the following steps.

1. Initially, we log into Gmail, go to Settings > Accounts and Import.

2. Under Check mail from other accounts, we click Add a mail account.

We fill the Email address, username, password, POP server name, and POP SSL/non-SSL port.

This is how we easily add an account in google.

Why the Gmail pop3 connection refused error occur?

However, errors may happen when we add an email account under Gmail. In most cases, the connection attempts are refused by the POP3 or IMAP server due to the block of the IMAP/POP3 port.

One such error is given below.

So, let’s see how our Support Engineers fix this error.

Gmail pop3 connection refused – The related errors and fix

At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face problems while managing the mail servers.

Now, let’s see the major reasons for this mail server related errors and how our Support Engineers fix the top errors.

Incorrect port number in Dovecot configuration file

Recently, one of our customers had a problem in adding an email account with Gmail account, He was trying to set up a pop3 connection to the new mail server on abc.com. But, he got an error from google as given below.

"server returned error: "Connection timed out: There may be a problem with the settings you added. Please contact your other email provider to verify the correct server name and port."

On checking the mail log, our Support Engineers found that the error was due to the misconfiguration in the Dovecot configuration file as incorrect port settings in main.conf and 10-ssl.conf.

So, we tweaked the secure port number 995 and that solved the error.

Finally, we were able to add the account in google account.

That’s it.

[Need assistance to Gmail pop3 connection errors? We’ll help you.]

Conclusion

In short, this Gmail pop3 connection refused error may happen due to the incorrect server name or the port number used in server-wide mail settings. Today, we saw how our Support Engineers to fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Usually, we will be using POP3 for adding another email address in Gmail. Sometimes, you may come across the error “server returned an error: “Connection timed out.” Check the settings of server-wide mail whether the port number or name of the server is incorrect.

Let us start adding the email address in Gmail using POP3:

Using Gmail as the main competency, many used to add another email. Few people also expect to use the remote server for sending emails. Here’s the step to add another email address in Gmail:

Step 1: Go to Gmail and then click on “Settings”. Choose “Accounts and Imports” so that you will have the option “Add a mail account”.

image.png

Step 2: Add the email address and login details like password & username. Don’t forget to set POP server name non-SSL/POP SSL port.

As said, you may get a problem while adding a new email address in Gmail by stating a server connection error, etc. Most probably, the reason for the error is IMAP or POP3 server its because of the port POP3 or IMAP.

While adding up the new account in Gmail, you may get the error stating:

«Server returned an error: «Connection timed out: There may be a problem with the settings you added. Please contact your other email provider to verify the correct server’s name and port.«

Check the settings of the port in Dovecot configuration files. It may get misconfiguration automatically by adding an incorrect port number.

Add the port number 995 by now, the error will be fixed. Now, you can add a new account in Gmail.

Finally, check the settings of port numbers and then start searching for another solution if still the error doesn’t get fixed.

I’m getting the following error when I attempt to use flask-mail to send an email through my gmail account.

error: [Errno 10061] No connection could be made because the target machine actively refused it

I’ve tried configuring flask-mail in various ways, but so far I always get this error.

Here are some sample configurations I’ve tried:

  1. app = Flask(__name__)
    mail = Mail(app)
    
    app.config.update(dict(
        DEBUG = True,
        MAIL_SERVER = 'smtp.gmail.com',
        MAIL_PORT = 465,
        MAIL_USE_TLS = False,
        MAIL_USE_SSL = True,
        MAIL_USERNAME = 'my_username@gmail.com',
        MAIL_PASSWORD = 'my_password',
    ))
    
  2. app = Flask(__name__)
    mail = Mail(app)
    
    app.config.update(dict(
        DEBUG = True,
        MAIL_SERVER = 'smtp.gmail.com',
        MAIL_PORT = 587,
        MAIL_USE_TLS = True,
        MAIL_USE_SSL = False,
        MAIL_USERNAME = 'my_username@gmail.com',
        MAIL_PASSWORD = 'my_password',
    ))
    
  3. This configuration is from the flask mega-tutorial (http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xi-email-support)

    app = Flask(__name__)
    mail = Mail(app)
    
    app.config.update(dict(
        DEBUG = True,
        # email server
        MAIL_SERVER = 'smtp.googlemail.com',
        MAIL_PORT = 465,
        MAIL_USE_TLS = False,
        MAIL_USE_SSL = True,
        MAIL_USERNAME = 'my_username',
        MAIL_PASSWORD = 'my_password',
    
        # administrator list
        ADMINS = ['my_username@gmail.com']
    ))
    

Has anyone else experienced a similar problem?

Deduplicator's user avatar

Deduplicator

44.7k7 gold badges67 silver badges118 bronze badges

asked Sep 18, 2013 at 20:38

Brett's user avatar

As far as I can tell there is nothing wrong with this configuration. The only problem is that your application is not using it. You should update configuration before you initialize Mail:

app = Flask(__name__)

app.config.update(dict(
    DEBUG = True,
    MAIL_SERVER = 'smtp.gmail.com',
    MAIL_PORT = 587,
    MAIL_USE_TLS = True,
    MAIL_USE_SSL = False,
    MAIL_USERNAME = 'my_username@gmail.com',
    MAIL_PASSWORD = 'my_password',
))

mail = Mail(app)

answered Sep 18, 2013 at 21:09

zero323's user avatar

zero323zero323

323k104 gold badges959 silver badges935 bronze badges

3

In addition to zero323’s answer, adding the configuration before creating a Mail object should help, but if it gives an SMTPAuthentication error with a gmail server, then just for testing purpose one may allow less secure apps to login for a while —
https://myaccount.google.com/security#signin

answered Mar 31, 2017 at 8:25

user2725012's user avatar

from flask import Flask
from flask_mail import Mail, Message

app = Flask(__name__)
app.config['MAIL_SERVER'] = 'smtp.gmail.com'
app.config['MAIL_PORT'] = 587
app.config['MAIL_USE_TLS'] = True
app.config['MAIL_USERNAME'] = 'youremail@gmail.com'
app.config['MAIL_PASSWORD'] = 'your_email_password'

mail = Mail(app)

@app.route('/')
def home():
    msg = Message('mail title', sender='sender of the email', recipients=['recipient2gmail.com'])
    msg.body = 'Body of the email to send'
    return 'Mail Sent...'


if __name__ == '__main__':
    app.run()

Running the with the right configurations should enable send an email.
Notice the mail is initialized after the configurations have been sent.

In case of any other errors, make sure your google account allows access from less secure applications.

answered Dec 14, 2020 at 20:55

Promise Uchegbunam's user avatar

Problem Description:

I’m following the steps in go quickstart gmail api.

On the function getTokenFromWeb, pasting either the long url
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=abcdefg.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly&state=state-token

or

http://localhost:8000

results in

This site can’t be reached. localhost refused to connect. ERR_CONNECTION_REFUSED

site can't be reached image

Following the same quickstart but for python works flawlessly.

If I get the token via python and use it in Go quickstart, it also works. So the issue is just on the token from web retrieval.

Solution – 1

The issue you are having is related to the removal of oob. When that sample was originally created oob still worked. So it would display a nice web page for you where you could copy the authorization code.

That no longer works so we are forced to use http://127.0.0.1 or localhost. As your machine apparently does not have a web server running its displaying to you a 404 error.

However if you look in the URL bar you will find the authorization code you need in order to authorize your application.

The solution is to simply copy the code from the url bar. If you want to fix the 404 your going to have to figure out how to start a web server in order to host the http://127.0.0.1 from.

The python sample does this by running a local server

creds = flow.run_local_server(port=0)

Php can do it using something like this

php -S localhost:8000 -t examples/

Im not sure how that can be done with Go though.

Понравилась статья? Поделить с друзьями:
  • Google drive ошибка сети при скачивании
  • Gmail ошибка 554
  • Google drive ошибка сертификата
  • Gmail ошибка при загрузке сервер отклонил загрузку
  • Google drive ошибка 404