Quotes in email address for mailer

I am trying to use the mailer to send email. I want to create a
sender and a recipient address that is in this form (note the quotes
around the sender name):

“sender name” [email protected]

To do this, in my sender model, I have tried something like this:

def combined_address
return “”" + self.name + “”" + " <" + self.email + “>”
end

However, the quotes around the name seem for some reason to be
stripped when I call the Mail object from the controller like this:

Mailit.deliver_sendTheMail(@sender.combined_name,
@recipient.combined_name)

When the mail is sent, it arrives in the mailbox looking like this
(quotes are gone):
sender name [email protected]

What should I be doing to get this to have the address contain the
quotes?

Shelby

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs