exchange server - How to send a Confidential email using VBScript -


i have been searching on-line on how send email attachment confidential. able create script able send email attachment can't figure out how send confidential.

i appreciate if can me how set email sensitivity in vbscript.

here's code:

call email  sub email      set objemail = createobject("cdo.message")     set objfso = createobject("scripting.filesystemobject")     objemail.from = "myemail"     objemail.to = "sendtoemail"     objemail.subject = "email title"     objemail.textbody = "email body"     objemail.addattachment "c:\temp\ersd\dchmar_" & sdate & ".txt"     objemail.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2     objemail.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="xx.xx.xx.xx"     objemail.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25     objemail.configuration.fields.item("http://schemas.microsoft.com/exchange/sensitivity") = 3     objemail.configuration.fields.update     objemail.send  end sub 

could try this?

it's unknown if have custom headers. check headers in outlook see if match i've posted below believe should accomplish you're asking.

set objemail = createobject("cdo.message") set objemailconf = createobject("cdo.configuration") set objfso = createobject("scripting.filesystemobject") objemail.from = "myemail" objemail.to = "sendtoemail" objemail.subject = "email title" objemail.textbody = "email body" objemail.addattachment "c:\temp\ersd\dchmar_" & sdate & ".txt" objemailconf.fields.item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objemailconf.fields.item("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="xx.xx.xx.xx" objemailconf.fields.item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'objemailconf.fields.item("http://schemas.microsoft.com/exchange/sensitivity") = 3 objemailconf.fields.update objemail.configuration.fields.item("urn:schemas:mailheader:sensitivity") = "company-confidential" objemail.configuration.fields.update objemail.send