Notice
Recent Posts
Recent Comments
관리 메뉴

안까먹을라고 쓰는 블로그

RedMine - Email by gmail 설정 본문

카테고리 없음

RedMine - Email by gmail 설정

YawnsDuzin 2019. 3. 19. 17:06

 

반응형

■ 설치환경

 - OS : Windows Server 2008

 - Redmine : redmine-2.6.0-3 (Bitnami 로 설치)

 

 

■ 설정항목

 ▶ configuration.yml 수정

 아래경로의 파일정보를 수정

 C:\Bitnami\redmine-2.6.0-3\apps\redmine\htdocs\config\configuration.yml

 

 

끝 부분의 아래 내용 수정

 

# specific configuration options for production environment
# that overrides the default ones
production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com"
      port: 25
      domain: "smtp.gmail.com"
      authentication: :login
      user_name: "xxxx@gmail.com"
      password: "xxxx"

# specific configuration options for development environment
# that overrides the default ones
development:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com"
      port: 25
      domain: "smtp.gmail.com"
      authentication: :login
      user_name: "xxxx@gmail.com"
      password: "xxxx"

 

 

 ▶ 구글 보안수준 설정

https://support.google.com/accounts/answer/6010255?hl=ko

 

구글에서 기본적으로 id/pw 로 smtp 접근을 허용하지 않으므로,
위 링크에 따라 [보안 수준이 낮은 앱이 계정에 액세스하도록 허용] 을 해주어야 함.

 

설정 완료 후, Redmine의 "관리" - "설정" - "메일 알림" 메뉴 우측 하단의 "테스트 메일 보내기" 선택

 - 정상적으로 연결 된 경우,  xxxx@mail.com님에게 메일이 발송되었습니다". 가 표시 됨.

 

■ 추가설정항목

C:\Bitnami\redmine-2.6.0-3\apps\redmine\htdocs\app\controllers\issues_controller.rb 을 열어보면

이슈 등록,수정을 담당하는 코드가 있다. RoR 로 개발해 본 경험이 파일을 찾는데 도움이 되네. 대략 196 line 정도를 보면 다음 코드가 있다.
Mailer.deliver_issue_edit(journal) if Setting.notified_events.include?('issue_updated')
이 부분이 이슈 수정되었으면 메일 날리라는 부분이다. 그럼 난 종료에만 관심이 있으므로 if 문으로 위 내용을 감싸주자.


if @issue.closed?
Mailer.deliver_issue_edit(journal) if Setting.notified_events.include?('issue_updated')
end

[참고페이지]  http://egloos.zum.com/kingori/v/4236006

 

반응형
Comments