EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How to set Display Name in the From: field in ElSimpleSMIMEMessage

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
Posted: 07/12/2010 08:34:15
by  Flemming Hansen

Im trying to set the display name in the From: field when sending a SMime email.

The [URL=http://tools.ietf.org/html/rfc5322#section-3.4]Address Specification[/URL] say we should be able to use this format:

DisplayName <email>

At the same time does your [URL=http://www.eldos.com/security/articles/3733.php?sphrase_id=24516]How-to's[/URL] says:

This certificate must also be issued for e-mail signing and contain the e-mail address, which corresponds to the address in From: property of the mail message.

That means we cant input the From address in the correct format and use the correct certificate.
Is there a field on the ElSimpleSMIMEMessage class that will allow us to specify the DisplayName?

If not, are there any other way to do the same.

Im using the 8.0.176 .Net version of SecureBlackBox.

Best Regard
Flemming Hansen
Posted: 07/13/2010 05:06:06
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

The how-to seems to be not accurate enough. The value specified in the certificate must correspond to the *address part* of the value contained in the "From: " field. In other words, no matter what is the value of the DisplayName part, the verifier will only look at the address part when validating the message.
Posted: 07/13/2010 05:29:01
by  Flemming Hansen
Hi Ivanov

Ok, thats fine, how do i then specify the Display Name?

I have tried to insert

DisplayName <email>

in the From: field.
Then i get an error saying <DisplayName <email>> is not a valid email.
I think this error comes from the SMTP server receiving the mail.
Posted: 07/13/2010 11:51:37
by Alexander Ionov (EldoS Corp.)

This was a bug in .NET edition. We are sorry for this. I've fixed it and the fix will be available in the next build of SecureBlackbox.

You will be able to set display name as following:
message.From = "DisplayName <first.name@domain.com>";

or as following if the display name contains double quotes:
message.To_.Add("\"Other Name\" <other@domain.com>");

Best regards,
Alexander Ionov



Topic viewed 718 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!