KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Sending bulk e-mail to undisclosed recipients
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: January 4, 2002
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

Have you ever received a bulk e-mail that said "recipient list suppressed" or one that was addressed to "undisclosed recipients"? If you want to send an e-mail like this to addresses from a 4D database, it is easy to do using 4D Internet Commands. You will need to construct your message using the low-level SMTP commands, like this:

C_LONGINT($iErr; $l_SMTPID)

$iErr :=SMTP_New ($l_SMTPID)
$iErr :=SMTP_Host ($l_SMTPID;"mail.server.com")
$iErr :=SMTP_From ($l_SMTPID;"me@mycompany.com")
$iErr :=SMTP_AddHeader ($l_SMTPID;"Disclose-recipients:";"prohibition";1)
$iErr:=SMTP_Bcc ($l_SMTPID;"you@yourcompany.com")
$iErr:=SMTP_Subject ($l_SMTPID;"An E-Mail For You!")
$iErr:=SMTP_Comments ($l_SMTPID;"Sent via 4th Dimension www.4d.com")
$iErr:=SMTP_Body ($l_SMTPID;"This is the body of the message")
$iErr:=SMTP_Send ($l_SMTPID)
$iErr:=SMTP_Clear ($l_SMTPID)

Note the use of the SMTP_AddHeader command to add the "Disclose-recipients" header.