You are hereBlogs / huyvq's blog / Cấu hình Redmine sử dụng Gmail SMTP


14 Oct 2009

Cấu hình Redmine sử dụng Gmail SMTP

Các bài trước mình đã trình bày cách cài đặt Redmine trên Dreamhost và trên hệ điều hành Centos. Trong quá trình sử dụng, bạn sẽ có lúc gặp trường hợp muốn Redmine gửi mail thông báo cho người dùng khi thông tin và tiến trình dự án được thay đổi. Trong bài này sẽ hướng dẫn cách sử dụng gmail smtp để gửi mail trong Redmine.

Trước hết chúng ta down file smtp_tls.rb có đính kèm phía dưới, rồi cho vào thư mục lib. Tiếp theo là cấu hình ActionMailer trong file config/email.yml với các thông số phù hợp với SMTP của tài khoản Gmail gần giống dưới đây.

production:
    delivery_method: :smtp
    smtp_settings:
      address: smtp.gmail.com
      port: 587
      domain: gmail.com
      authentication: :login
      user_name: info@expandrive.com
      password: password

Tiếp theo thêm dòng khai báo sử dụng thư viện smtp vào file production.rb

require 'smtp_tls'

Bây giờ chúng ta có thể gửi mail bằng tài khoản Gmail qua Redmine. OK?

AttachmentSize
smtp_tls.rb1.46 KB

Em cấu hình cái mail này mãi không được. Anh chắc như vậy chứ?
Cấu hình file: email.yml và environment.rb mà ko đc. Nhiều người cũng gặp vấn đề như này mà e chưa thấy hướng giải quyết nào khả thi cả

Post new comment

Google Friend Connect (leave a quick comment)
Loading
The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><a><embed><br><p>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <html>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Cộng đồng

Syndicate

Syndicate content