-
Notifications
You must be signed in to change notification settings - Fork 936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding several To addresses not possible? #23
Comments
You can just do:
Each time you assign to='value' it will overwrite the previous value. Mikel |
Thanks Mikel, missing something completely obvious it is :) |
no problem :) |
This doesn't work for me. No matter how I add the multiple recipients, ti only gets delivered to the first one. I've tried:
I only ever get an email to the first recipiento only. No errors. If I do it from an IRB, I can see the |
Hi,
I've been trying add to several to addresses to an outgoing e-mail.
Reading
Mail::Message:to
(and to=) documentation I found nothing about several recipients.I tried to add several recipents by:
mail = Mail.new do
to 'first-address@domain.tld'
to 'second-address@domain.tld'
...
end
puts mail
Which just sets the
to
field to the second address. Then I tested adding them as an array intoto
but then I got an error aboutgsub
on an array.I ended up doing
mail = Mail.new do
self['To'] = 'first-address@domain.tld, second-address@domain.tld'
....
end
puts mail
Which set
To
to both addresses and the mail was delivered successfully to all recipients.Is this the intended way of doing this or am I missing something obious? :)
/ba
The text was updated successfully, but these errors were encountered: