Sending mail using Gmail returns error failed to connect to smtp
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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