SQL Server
SQL Server
Set Uncommon Email Options
See more Email Object Examples
Demonstrates the Chilkat Email.UncommonOptions property, a catch-all for uncommon needs. It defaults to the empty string and should typically remain empty. Recognized keywords include NoBccHeader (do not add the Bcc MIME header for BCC addresses — which must be set before calling AddBcc or AddMultipleBcc) and NO_FORMAT_FLOWED (do not automatically add format=flowed to a Content-Type header). This example sets NoBccHeader.
Background: Long-lived libraries accumulate rare, situational tweaks that do not each deserve their own property. Chilkat gathers these into a single keyword-driven
UncommonOptions string. NoBccHeader is a good example: normally a Bcc header is generated (and stripped at send time), but certain workflows want it omitted entirely. Only documented keywords have any effect — unrecognized text is ignored — so leave this empty unless a specific compatibility need arises.Chilkat SQL Server Downloads
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
DECLARE @hr int
DECLARE @sTmp0 nvarchar(4000)
-- Demonstrates the Email.UncommonOptions property, a catch-all for uncommon needs.
-- It defaults to empty and should usually remain empty. Recognized keywords include
-- "NoBccHeader" (do not add the Bcc MIME header) and "NO_FORMAT_FLOWED".
DECLARE @email int
EXEC @hr = sp_OACreate 'Chilkat.Email', @email OUT
IF @hr <> 0
BEGIN
PRINT 'Failed to create ActiveX component'
RETURN
END
EXEC sp_OASetProperty @email, 'Subject', 'UncommonOptions example'
EXEC sp_OASetProperty @email, 'From', 'alice@example.com'
-- Do not add the Bcc MIME header for BCC recipients. This keyword must be set
-- before calling AddBcc or AddMultipleBcc.
EXEC sp_OASetProperty @email, 'UncommonOptions', 'NoBccHeader'
DECLARE @success int
EXEC sp_OAMethod @email, 'AddBcc', @success OUT, 'Joe', 'joe@example.com'
EXEC sp_OAGetProperty @email, 'UncommonOptions', @sTmp0 OUT
PRINT 'UncommonOptions = ' + @sTmp0
EXEC @hr = sp_OADestroy @email
END
GO