dawidd6 / action-send-mail

:gear: A GitHub Action to send an email to multiple recipients
MIT License
455 stars 188 forks source link

Can't send email #155

Closed John4650-hub closed 1 year ago

John4650-hub commented 1 year ago

I have followed every step as shown in the example from the readme but the job fails with error that Username and password not specified Here is my full workflow

name: Send Job Logs to Email

on:
  push:
    branches:
      - master

jobs:
  send_email:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
    - name: Get the log output
      run: | 
       echo "Job Logs"
       ls
       apt list 

    - name: Send log output to email
      uses: dawidd6/action-send-mail@v3
      with:
        server_address: smtp.gmail.com
        server_port: 25 
        username: ${{secrets.EMAIL_ADD}}
        password: ${{secrets.PWD_EMAIL}}
        from: james
        to: johnpatrick@gmail.com
        subject: Job Logs - ${{ env.GITHUB_REPOSITORY }}
        body: |
          Logs: ${{ steps.Get_the_log_output.outputs.logs }}        
dawidd6 commented 1 year ago

double check if your secrets are properly set

John4650-hub commented 1 year ago

It was a naming issue sorry, but now am getting another error that Invalid login: 534-5.7.9 Application-specific password required Do i need to create an app password now ?

dawidd6 commented 1 year ago

https://github.com/dawidd6/action-send-mail#gmail