SMTP problem sending to multiple recipients

Discussion in 'Ruby' started by Michael Satterwhite, Apr 8, 2009.

  1. Please consider the following code snippet:

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

    This is a test message.
    EOS

    Net::SMTP.start(<servername>, 26, <server>, <username>, <passwd>,
    :plain) do |smtp|
    smtp.send_message(msg, <fromaddress>, ['',
    ''])
    end

    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
    ---Michael
    --
    Posted via http://www.ruby-forum.com/.
     
    Michael Satterwhite, Apr 8, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    1,118
    Roedy Green
    Jan 24, 2006
  2. Alex Hunsley
    Replies:
    2
    Views:
    890
    Paul Wright
    Jul 1, 2004
  3. Kun
    Replies:
    5
    Views:
    425
    Tim Roberts
    Mar 27, 2006
  4. Logesh Subramani

    Sending email to multiple recipients

    Logesh Subramani, Aug 5, 2008, in forum: Ruby
    Replies:
    1
    Views:
    155
    James Britt
    Aug 5, 2008
  5. Joseph Clark
    Replies:
    2
    Views:
    246
    Dave Lilley
    Oct 14, 2010
Loading...

Share This Page