Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > SMTP problem sending to multiple recipients

Thread Tools

SMTP problem sending to multiple recipients

Michael Satterwhite
Posts: n/a
Please consider the following code snippet:

msg = <<EOS
From: <anaddress>
To: <anotheraddress>
Subject: A Test Message

This is a test message.

Net::SMTP.start(<servername>, 26, <server>, <username>, <passwd>,
lain) do |smtp|
smtp.send_message(msg, <fromaddress>, ['(E-Mail Removed)',
'(E-Mail Removed)'])

If I execute this, only one of the two recipients will get a copy of the
message. No errors are seen, but the second address just gets discarded.
I'm pretty sure it's not the server playing games as a similar action in
the python equivalent works cleanly.

Could someone offer some help?
Thanks much
Posted via

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
net/smtp Multiple Email recipients Issue Joseph Clark Ruby 2 10-14-2010 06:05 AM
Sending email to multiple recipients Logesh Subramani Ruby 1 08-05-2008 06:52 AM
Sending SMTP mail when SMTP server is unavailable Java 3 01-24-2006 06:53 PM
smtp module - specifying multiple email recipients? Alex Hunsley Python 2 07-01-2004 01:32 PM
sending of mail (smtp) - connection refused - but smtp server isrunning! Alex Hunsley Python 4 06-29-2004 04:30 PM