linkedin / linkedin/iris

Sending mail using Gmail returns error failed to connect to smtp

Open
#499 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
845
Forks
146
PR merge metrics
No merged PRs in 30d

Description

when entering credentials in the ./config/config.dev.yaml file for the iris_smtp
once firing up the sender and creating an incident, the output received is:

File "/home/user1/iris/src/iris/vendors/iris_smtp.py", line 148, in send_email raise Exception('Failed to get smtp connection.') Exception: Failed to get smtp connection.

Example yaml file

  • type: iris_smtp
    name: email
    smtp_server: 'smtp.gmail.com'
    smtp_gateway: 'smtp.gmail.com'
    from: 'myemail@gmail.com'
    port: 25
    username: 'username@gmail.com'
    password: 'password'

I tried different port, also changed on googleaccount to allow "unsafe" third party tools to send mails.
I also played with the login information where username entered withouth @gmail.com etc.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with iris/vendors/iris_smtp.py at line 148 and the iris_smtp settings in ./config/config.dev.yaml; reproduce the failure by starting the sender and creating an incident. Check how the configured Gmail server, port, username, and password are used, then verify the sender can establish an SMTP connection and deliver the message successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.