4

I'm trying to send an email using SEND in Rebol 2:

send foo@bar.com "A Message"

How do I BCC a second address? I've tried the following without success:

send/header foo@bar.com "A Message" make system/standard/email [
    BCC: baz@bar.com
]

This still goes to the first recipient, but not the BCC address. Is this a misunderstanding of how BCC works?

Also, using a custom header no longer copies part of the message for the subject line, but not so worried about that...

rgchris
  • 3,698
  • 19
  • 19

1 Answers1

1

The correct way for BCC is to put the same address to TO as well:

send/header [
    test1@example.com test2@example.com
] "A Message" make system/standard/email [
    bcc: test2@example.com
]

You TRACE/NET ON to see the difference with and without adding TO.

And here you can find a similar question:

Sending BCC emails using a SMTP server?

Community
  • 1
  • 1
endo64
  • 2,269
  • 2
  • 27
  • 34
  • As far as I can tell, this sends the same message twice to the SMTP server and other recipients can see who's in the BCC line. – rgchris Nov 21 '15 at 08:56
  • The [second answer](http://stackoverflow.com/a/26611044/292969) on that page correctly describes the behaviour I'm looking for. See: http://codereview.stackexchange.com/q/111395/46291 – rgchris Nov 21 '15 at 08:58
  • I tested the above code, other recipients cannot see the address in BCC. But I think you are right that it sends the same msg twice. – endo64 Nov 21 '15 at 13:10
  • Some receiving servers will strip the BCC field en route, others won't. It seems the only certain way to prevent it being shared is to strip prior to sending. – rgchris Nov 21 '15 at 19:16