¿El error te lo da al enviar o al ver el formulario? Yo diría que es
lo segundo y que el problema lo tienes con tu @persona. ¿Está bien
asignada esa variable? ¿Has verificado que tenga el atributo 'mail?
el error me lo da luego de llenar el formulario y presionar “Enviar”,
que me lleva al metodo enviar_mail:
def enviar_mail
Correo::deliver_enviar(params[:correo])
end
---------------------------------------Clase
Correo--------------------------
class Correo < ActionMailer::Base
def mailings ()
exceptions = {}
recipients.each_slice(SENDING_BATCH_SIZE) do |recipients_slice|
Net::SMTP.start(‘localhost’, 25) do |sender|
recipients_slice.each do |recipient|
tmail.to = recipient
begin
sender.sendmail tmail.encoded, tmail.from, recipient
rescue Exception => e
exceptions[recipient] = e #needed as the next mail will send command MAIL FROM, which
would #raise a 503 error: “Sender already given”
sender.finish
sender.start
end
end
end
end
end
end
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.