Fix send emails

master-old
Emilio Blanco 2011-03-27 21:28:10 -03:00
parent 231b1e1d1c
commit eff724bdb5
2 changed files with 15 additions and 4 deletions

13
README
View File

@ -17,4 +17,15 @@ Installation
}
end
3 Use it
3. Configure SMTP settings
# initializers/smtp_settings.rb
ActionMailer::Base.smtp_settings = {
:address => "mail.example.com.py",
:port => 26,
:authentication => :plain,
:enable_starttls_auto => true,
:user_name => "emilio@example.com.py",
:password => "yourpass"
}
4 Use it

View File

@ -131,7 +131,7 @@ class WebmailController < ApplicationController
def compose
if @mail.nil?
operation = operation_param
if operation == _('Send')
if operation == t(:send)
@mail = create_mail
encmail = @mail.send_mail
get_imap_session
@ -139,8 +139,8 @@ class WebmailController < ApplicationController
# delete temporary files (attachments)
@mail.delete_attachments()
render :action => "webmail/mailsent"
elsif operation == _('Add')
render :action => :mailsent
elsif operation == t(:add)
@mail = create_mail
attachment = CDF::Attachment.new(@mail)
attachment.file = params['attachment']