Digital Signature

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a .Net Service that is sending mails using SMTP Server/Exchange Server how do i put in a Digital Signature so the reciver is 100% sure that the mail i from the owner of Server where the Service is running ?

It should worke something lige Outlook does it you type in your secret password and Outlook together with the code create a Mail with digital signature

Thank

Ki

If I have to use another way of sending mails to use Digital Signature, please tell me so

To send the mail I use this code

Public Sub Send_Mail(ByVal m_AttachmentPath As String, ByVal m_TextBody As String, ByVal m_From As String,
ByVal m_SendTo As String, ByVal m_TrackID As String, ByVal m_Database As String, ByVal m_Subject As String,
Optional ByVal m_MDNRequested As String = "", Optional ByVal m_HTMLBody As String = ""
Dim cnn As ADODB.Connectio
Dim strUrl As Strin
Dim rec As ADODB.Recor

Tr
Dim MsgConfig As CDO.Configuration = New CDO.Configuratio
Dim MailMessage As CDO.Message = New CDO.Messag
Dim oFlds As ADODB.Field
oFlds = MailMessage.Field
oFlds.Item("urn:shemas:mailheader:test").Value = "Test
oFlds.Update(
MsgConfig.Fields("SendUsing").Value = 3 'CDO.CdoSendUsing.cdoSendUsingExchang
MsgConfig.Fields.Update(
MailMessage.Configuration = MsgConfi
MailMessage.Fields.Append("urn:schemas:mailheader:MyMailHeader", ADODB.DataTypeEnum.adBSTR, , , "1"
MailMessage.Fields.Append("evision", ADODB.DataTypeEnum.adBSTR, , , Verify_Guid.ToString
MailMessage.Fields.Append("trackid", ADODB.DataTypeEnum.adBSTR, , , "1"
MailMessage.Fields.Append("replyadr", ADODB.DataTypeEnum.adBSTR, , , m_From
MailMessage.MDNRequested = m_MDNRequeste
MailMessage.To = m_SendT
MailMessage.Subject = Verify_Guid + ";" + m_TrackID.ToString + ";" + m_From + ";" + m_Database + ";" + m_Subjec

MailMessage.From = m_Fro

If m_TextBody <> "" The
MailMessage.TextBody = m_TextBod
Els
MailMessage.HTMLBody = m_HTMLBod
End I

MailMessage.AddAttachment(m_AttachmentPath
MailMessage.Fields.Update(
MailMessage.Send(

MailMessage = Nothin
Catch e As System.SystemExceptio
EventLog.WriteEntry("Error", "Mail is not send, error: " & e.Message, System.Diagnostics.EventLogEntryType.Error, 1
End Try
 
Hi Kim,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to digital sign a mail message
programatically. If there is any misunderstanding, please feel free to let
me know.

Based on my research, The Outlook object model does not provide direct
support for programmatically signing or encrypting mail messages. However,
you can create a solution that automatically signs or encrypts mail
messages.

Outlook was not designed to provide full functionality for digitally
signing and encrypting e-mail messages. However, you can use the
CommandBars object model, which is exposed through the Outlook object
model, to create a client-based solution that may suit your needs.

Here is a KB article for your reference. HTH.

http://support.microsoft.com/?id=279013

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hi Kevin, Thanks for your answer

I think that you had misunderstanding my example. I’m not sending the mail from Outlook, it is send from an Exchange Server using EXOLEDB. If you have a better way to send the mails, feel free to show me

I have a .Net Service, that is sending mails, with important information from an economy system, and there for it is very important that the mail is signed with a Digital Signature so the receiver of the mail can trust that it comes from my service!

The Danish Law says that invoices have to have Digital Signature if they are send per. mail

This is a description of my program, how it should work

My .Net Service need a password from the user that matches the Digital Signature (The Password will be saved, with his Windows password matching from AD, so the user don't have to type it again), and then the .Net Service That is running on a server, sends the created mail with the correct Digital Signatur

So what I need is

A way to send mails from a server, with Digital Signature

Best regard

Kim HM
 
Hi Kim,

Since you're using CDO, Microsoft Collaboration Data Objects for Windows
2000 (CDOSYS) and Microsoft Collaboration Data Objects for Exchange 2000
(CDOEX) do not directly provide a way to digitally sign or encrypt a
message. The application programming interface (API) does not expose any
functionality to generate a valid signature. However, you can use the
Cryptography API in combination with CDOSYS or CDOEX to digitally sign
and/or encrypt a message. Here are some KB articles stating about this.

http://support.microsoft.com/default.aspx?scid=kb;en-us;280391
http://support.microsoft.com/default.aspx?scid=kb;en-us;318215

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top