But doesn't the Interceptors version not do anything with the cc array? In the ApplicationMailer version, it iterates over the ccs and calls super(mail) for each. In the Interceptors module, it just creates a string of the cc's but then wipes out that array, then creates a string that says it is going to all of those users but there's no code that causes that to happen. Correct?
Aside from the slight changes to how we handle CC's (which the team is happy with) this will do the same thing as the original code
We actually ended up missing the additional CC emails so that block has since been replaced with:
ifmail.cc.present?mail.cc.eachdo|recipient|RawMailer.raw("from"=>mail.from,"recipients"=>recipient,"subject"=>"CCed version of: #{original_subject}","plain_text_content"=>mail.parts.first.body.to_s,"html_content"=>mail.parts.last.body.to_s).deliver_laterendmail.cc=[]end
So now it does basically the same thing.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
But doesn't the Interceptors version not do anything with the cc array? In the ApplicationMailer version, it iterates over the ccs and calls super(mail) for each. In the Interceptors module, it just creates a string of the cc's but then wipes out that array, then creates a string that says it is going to all of those users but there's no code that causes that to happen. Correct?
Yup, I called that out after the example
We actually ended up missing the additional CC emails so that block has since been replaced with:
So now it does basically the same thing.