Skip to content
Knowledge base

How to encrypt email at work: S/MIME, Microsoft 365 and attachment encryption

Microsoft 365 encrypts connections between mail servers without any configuration, yet the message itself sits readable in the sender's and the recipient's mailboxes. Only S/MIME, based on certificates, or Microsoft Purview Message Encryption, which also reaches recipients on Gmail, protects the content, and the choice depends on the recipient, the attachment and whether the mail filter needs to see the content.

An HR officer sends the payroll spreadsheet, complete with national ID numbers, to an outside accounting firm, and a salesperson sends a client a contract with a price list. Both assume that because the company’s email runs on Microsoft 365, the message “travels encrypted”. That is only half true: the connection between servers is encrypted, but the message itself sits readable in the sender’s mailbox, in the recipient’s mailbox and on every device on which someone opens it.

So the question of how to encrypt email has two layers: transport and content. From a cybersecurity point of view the difference is fundamental, because encryption of the connection protects a message only in transit, whereas encryption of the content also protects it where it is stored. There are two main tools to choose from: the certificate-based S/MIME standard and the message encryption built into Microsoft 365.

Is your everyday business email encrypted?

The connection usually is; the content is not. According to Microsoft Learn’s documentation on email encryption, Microsoft 365 encrypts the connection, or session, between two servers with TLS by default, with no configuration on the customer’s side. That protection ends at delivery, however. Microsoft’s description of S/MIME in Exchange Online points out that SMTP-based email does not secure messages on its own: anyone who sees a message as it travels, or where it is stored, can read it.

Transport encryption can be tightened on the recipient domain’s side. That is the job of MTA-STS and TLS-RPT: under RFC 8461, MTA-STS lets a domain declare that it accepts TLS connections and specify whether sending servers should refuse to deliver when a mail server does not offer TLS with a trusted certificate. This still protects the route, not the content. Once delivered, the message can be read by anyone with access to the mailbox: the owner, a person with delegated access or an attacker who has taken over the password.

Even content encryption does not always cover the headers. RFC 8551, which specifies S/MIME, presents protection of the Subject, To, From and Cc fields as an option: the sender’s client may wrap the whole message in the message/rfc822 type and only then encrypt it. It is safer to assume the subject line will be read and to keep a patient’s name, a contract number or an amount out of it.

How does S/MIME work under RFC 8551?

S/MIME is a standard that adds digital signatures and encryption based on certificates and public keys to email. RFC 8551, published in April 2019, specifies version 4.0 and replaces version 3.2 from RFC 5751. According to the document, a digital signature provides authentication, message integrity and non-repudiation of origin, while encryption provides data confidentiality.

The encryption mechanism combines two kinds of key. The content is encrypted with a symmetric key, and to deliver that key to the recipients, the sender needs the public key of each of them, which is how RFC 8551 describes the EnvelopedData type. The recipient recovers the symmetric key with their private key. Without the recipient’s certificate, the sender therefore cannot encrypt the message, even if they have a certificate of their own.

The standard also sets the algorithms. RFC 8551 requires clients conforming to version 4.0 to support AES-128 GCM and AES-256 GCM encryption, and when the sender does not know the recipient’s capabilities, it recommends AES-256 GCM.

Encryption and decryption are performed by the sender’s and the recipient’s mail clients, while the servers along the way carry only ciphertext. A certificate with its private key therefore has to be installed on every computer and phone on which the user reads mail, which Microsoft lists as the final configuration step.

Is an S/MIME signature enough to keep a message confidential?

No. The Exchange Online documentation stresses that a message that is only signed is sent in clear text, like ordinary email, and can be read by anyone who intercepts it. A signature confirms the sender and that the content has not changed in transit, but it hides nothing.

It works the other way round too. A message that is encrypted but not signed says nothing about the sender and, according to Microsoft, is just as open to sender impersonation as an unencrypted message. Someone who knows the recipient’s certificate can send them an encrypted message in the chief executive’s name, and the encryption alone will not reveal it.

RFC 8551 adds a technical detail. Modification of the ciphertext in EnvelopedData can go undetected if the message is not also signed, and this is one of the reasons the standard is moving to the AuthEnvelopedData type with authenticated encryption.

Key takeaways:

  • TLS in Microsoft 365 encrypts the connection between servers, not the message in the mailbox.
  • An S/MIME signature confirms the sender and integrity, but the content stays readable.
  • Encryption without a signature hides the content but does not confirm who sent it.
  • Messages containing sensitive data are best signed and encrypted at the same time.

What do you need to prepare before sending your first S/MIME email?

A certificate for every user and access to the recipients’ certificates. Microsoft’s guide to configuring S/MIME in Exchange Online requires each user to have their own certificate for signing and encryption and splits the roll-out into five steps: issuing and publishing certificates, a virtual certificate collection to validate them, synchronising users’ certificates into Microsoft 365, policies for installing the S/MIME extension in browsers for Outlook on the web, and configuring mail clients.

The first decision concerns the issuer: an in-house Windows-based certification authority or an external provider. Microsoft notes that certificates from a third-party authority are automatically trusted by all clients and devices, whereas certificates from an internal authority are not, and not every device, a phone for example, can be configured to trust them.

The second decision concerns exchanging certificates with recipients outside the organisation. RFC 8551 describes a simple start: a mail client can ask the recipient for their certificate in a signed return message. From then on, the sender holds the partner’s public key and can encrypt further messages.

The third matter is upkeep. According to Microsoft’s comparison of encryption options in Microsoft 365, recipients have to keep their own private keys secure, and if those keys are compromised, a new key is needed and the public keys have to be redistributed to all potential senders. RFC 8551 takes 2048 bits as the RSA key size and notes that many experts now consider RSA and DSA keys shorter than 2048 bits insecure.

There are practical limits as well. Outlook on the web disables S/MIME in messages carrying sensitivity labels with protection actions, and the policy that installs the extension in Edge and Chrome requires devices joined to a domain or to Microsoft Entra ID.

How do you encrypt email in Microsoft 365 without certificates?

With Microsoft Purview Message Encryption, a service built on Azure Rights Management. According to Microsoft Learn’s description of the service, users encrypt a message in Outlook or Outlook on the web by choosing the encrypt-only option, the Do Not Forward option or a rights management template. Unlike S/MIME, the service needs no public key infrastructure and no user certificates.

Administrators can take the decision away from users. Mail flow rules in Exchange Online encrypt messages that meet set conditions, for example all messages to a specified recipient or with particular words in the subject line. The Exchange Online documentation points out that with S/MIME it is the user who decides whether to encrypt each message, whereas here a rule set by the administrator does it for them.

A major advantage of this method is reach beyond Microsoft 365. A recipient on Gmail or Yahoo receives a message with a link to the encrypted message portal and signs in with a Microsoft, Gmail or Yahoo account. According to the comparison in the Email encryption documentation, they can also use a one-time passcode, do not need a Microsoft 365 subscription, and the service encrypts their replies as well.

The older Office 365 Message Encryption service has been deprecated, so older instructions may be out of date. The Advanced Message Encryption add-on also lets you set access expiry and revoke access to a message, but only for recipients outside the organisation who read it in the portal.

How do you encrypt an email attachment?

The simplest way is together with the message, but the details depend on the method. S/MIME secures MIME entities, and RFC 8551 allows a whole tree of them to be protected, so an encrypted message also covers the attachments that form part of it.

The Purview Message Encryption FAQ explains that a file of any type can be attached to a protected message, but protection policies cover only some formats. Office files in the newer formats, such as docx, xlsx and pptx, are encrypted by default, whereas the older .doc, .xls and .ppt formats are not supported. PDF files are encrypted only once an administrator enables the feature with the Set-IRMConfiguration command in Exchange Online PowerShell.

Protection travels with the file. According to the FAQ, a protected Word, Excel or PowerPoint file stays protected even after it is downloaded: if the message carried the Do Not Forward option and the recipient attaches the downloaded file to a new message, the new recipient cannot open it.

There are limits too. The maximum size of a message encrypted with Purview, attachments included, is 25 MB. Attachments in the form of SharePoint or OneDrive links are not supported: the service will encrypt the message but not the file in the cloud. A spreadsheet in the .xls format is worth saving as .xlsx before it is sent.

When the recipient supports none of these methods, what remains is encrypting the file itself on the user’s side, with access passed on through a different channel from the file.

When should you choose S/MIME and when Microsoft 365 message encryption?

The recipient and the purpose decide. In its comparison of encryption options, Microsoft recommends Purview Message Encryption for sending sensitive information to people outside the organisation, whether consumers or other businesses, and gives the examples of a bank sending credit card statements and a doctor’s office sending medical records.

Microsoft recommends S/MIME where the sender’s or the recipient’s organisation requires true peer-to-peer encryption. As examples, the documentation gives government agencies corresponding with other agencies and businesses dealing with a government agency. A third option, Information Rights Management, combines encryption with usage restrictions, such as a ban on forwarding or printing.

Microsoft also warns against combining methods. You should not apply several encryption technologies to the same message, because Outlook for Mac, iOS and Android may then be unable to open it. Organisations corresponding with partners who use PGP should know that Microsoft 365 does not support PGP/MIME, and PGP messages can be sent and received only in the PGP/Inline format.

What does email encryption change for filtering malicious messages?

With end-to-end encryption it makes filtering harder, because the filter cannot see encrypted content. Microsoft Learn’s comparison of options states plainly that S/MIME does not allow encrypted messages to be scanned for malware, spam or policies. To a mail gateway, an encrypted attachment is a closed box.

Nor does encryption solve the question of who the sender is. The sender’s domain is authenticated by separate mechanisms, SPF, DKIM and DMARC, covered in the article on email security. An attack in which a criminal impersonates the board and asks for a transfer passes through encryption unhindered if the message is not signed.

Encrypted messages from unknown senders therefore call for more caution, not less, and your organisation should know which partners it accepts S/MIME mail from. The remaining layers of protection are brought together in the email security overview.

How does email encryption relate to your GDPR obligations?

The GDPR does not require every message to be encrypted, but it lists encryption among security measures. Under Article 32(1) GDPR, the controller and the processor implement technical and organisational measures appropriate to the risk, including, as appropriate, the pseudonymisation and encryption of personal data (point (a)).

Encryption also matters when something goes wrong. A payroll spreadsheet sent to the wrong address is an unauthorised disclosure of data, that is, a personal data breach within the meaning of Article 4(12). Article 34(3)(a) releases the controller from notifying the individuals concerned if the data was protected by measures such as encryption that render it unintelligible to anyone not authorised to access it. The obligation to document the breach under Article 33(5) remains unchanged.

Legal position as of 24 October 2026.

The GDPR applies across the European Union; organisations outside it should check the data protection law that governs them. In practice, email encryption belongs in the risk assessment as a measure for specific data flows, such as payroll files sent outside the organisation. A broader view of encryption in a business, from drives to databases, is given in the overview of data encryption solutions.

How do you match the encryption method to everyday situations?

The starting point is the recipient and what should happen to the content after delivery.

SituationMethodWhat must be in placeWhat to watch for
Payroll sent to an external accounting firmPurview Message Encryption with a rule for the firm’s domainA mail flow rule in Exchange OnlineSpreadsheet in .xlsx, not .xls; size limit
Correspondence with a public authority that requires S/MIMES/MIME, signed and encryptedCertificates on both sides, recipient’s certificate exchangedSubject line free of personal data
A draft contract that must not leave the teamDo Not Forward or an IRM templateA protection template in Microsoft 365Recipients on mobile devices and older clients
Documents for a private client on GmailPurview Message Encryption via the portalNothing on the recipient’s sideThe client has to open the portal and sign in
A file for a partner with neither Microsoft 365 nor S/MIMEFile encryption on the user’s sideAn agreed way of passing on accessAccess to the file must not travel in the same email
Proof that a message comes from your organisationS/MIME signatureA sender certificate from a trusted authorityA signature does not hide the content

Key takeaways:

  • Choose the encryption method per data flow, not for the whole organisation at once.
  • Purview Message Encryption works best for external recipients without certificates.
  • S/MIME needs certificates on both sides and well-planned key handling.
  • An S/MIME-encrypted message or an encrypted file is invisible to the mail filter, so mailbox protection is still needed.

How can nFlo help you encrypt email and files?

When you need encryption that does not depend on your mail provider, we deploy Cypherdog Encryption. According to the product page, the tool combines asymmetric RSA 3072 encryption with symmetric AES-256 and works without a “trusted” third party: neither Cypherdog nor the mail provider holds copies of the private keys. A file is encrypted by right-clicking and selecting a recipient, and an email either in full or in a selected part of the text. We deliver the deployment as a project, from requirements analysis through configuration and integration to team training.

S/MIME and file encryption hide content from the filter too, so mailbox protection matters alongside them. Barracuda Email Protection filters mail before delivery as a gateway or works through API integration with Microsoft 365 and Google Workspace, and it protects against phishing, impersonation of senior managers, ransomware in attachments and account takeover.

S/MIME certificates are issued by a certification authority, either in-house or external. If you want to establish which messages in your organisation need encrypting, and with which method, let’s talk.

What else should you know about encrypting email?

Can a recipient on Gmail read a message encrypted in Microsoft 365?

Yes, if the sender used Microsoft Purview Message Encryption: the recipient opens the message in the portal, signing in with a Microsoft, Gmail or Yahoo account or with a one-time passcode. With S/MIME they need a certificate of their own.

Does encrypting an email hide the subject line?

Not always. S/MIME protects the subject, sender and recipients only when the sender’s client wraps the whole message in a separate MIME entity, so treat the subject line as visible.

Does the GDPR require every email containing personal data to be encrypted?

Not directly. Article 32 GDPR lists encryption as a measure applied where appropriate, and the risk assessment decides for each specific data flow.

Can you use S/MIME and Microsoft 365 encryption on the same message?

Microsoft advises against it, because Outlook for Mac, iOS and Android may be unable to open a message with several layers of encryption.

Does Microsoft 365 support PGP encryption?

Only in the PGP/Inline format, using third-party tools. The PGP/MIME format is not supported, so agree the message format with your partner before the first exchange.

Share:

Talk to an expert

Have questions about this topic? Get in touch with our specialist.

Sales Representative
Łukasz Gil

Łukasz Gil

Sales Representative

Response within 24 hours
Expert consultation
Individual approach

Providing your phone number will speed up contact.

Want to Reduce IT Risk and Costs?

Book a consultation - we respond within 24h

Response in 24h Custom quote No obligations