name: Send e-mail to site for designated issues
on:
  issues:
    types: [opened]
jobs:
  email-sri:
    if: ${{ contains(github.event.issue.body, "site_forward: sri") }}
    steps:
      - uses: dawidd6/action-send-mail@v3
        with: &EMAIL_CONFIG
          server_address: ${{secrets.MAIL_SERVER}}
          server_port: ${{secrets.MAIL_PORT}}
          username: ${{secrets.MAIL_USERNAME}}
          password: ${{secrets.MAIL_PASSWORD}}
          to: ${{secrets.RECIPIENT_SRI}}
          title: ${{github.event.issue.title}}
          body: ${{github.event.issue.body}}
          html_body: ${{github.event.issue.body}}
          convert_markdown: true
          from: NCANDA Support #<ncanda-support@sri.com>

  email-ohsu:
    if: ${{ contains(github.event.issue.body, "site_forward: ohsu") }}
    steps:
      - uses: dawidd6/action-send-mail@v3
      - with:
          <<: *EMAIL_CONFIG
          to: ${{secrets.RECIPIENT_OHSU}}

  email-upmc:
    if: ${{ contains(github.event.issue.body, "site_forward: upmc") }}
    steps:
      - uses: dawidd6/action-send-mail@v3
      - with:
          <<: *EMAIL_CONFIG
          to: ${{secrets.RECIPIENT_UPMC}}

  email-duke:
    if: ${{ contains(github.event.issue.body, "site_forward: duke") }}
    steps:
      - uses: dawidd6/action-send-mail@v3
      - with:
          <<: *EMAIL_CONFIG
          to: ${{secrets.RECIPIENT_DUKE}}

  email-ucsd:
    if: ${{ contains(github.event.issue.body, "site_forward: ucsd") }}
    steps:
      - uses: dawidd6/action-send-mail@v3
      - with:
          <<: *EMAIL_CONFIG
          to: ${{secrets.RECIPIENT_UCSD}}


Create a Github Action for sending site an e-mail for designated issues
Create a Github Action for sending site an e-mail for designated issues
