search

Home  >  Q&A  >  body text

How to determine which email client is being used?

I wanted to see if there was a way to customize the HTML email based on the user's email client.

I was wondering if there was a reliable way to do this via something like a user agent that could indicate that it was looking in Gmail, Outlook, etc. So is there a simple way to show and hide some IDs that contain client specific content, kind of like a media query. I don't see any support for user agent media queries, so this seems far-fetched.

I know modern clients don't tend to support Javascript, so this complicates things. To be honest, I'd be very surprised if these things were accomplished in the first place, but I think it's worth asking.

For context, this message will tell people how to edit their email signature, which is different for each client. I'd rather have a dynamic set of instructions than provide instructions for each customer.

P粉514458863P粉514458863255 days ago388

reply all(1)I'll reply

  • P粉147045274

    P粉1470452742024-03-22 21:37:55

    This is sometimes possible, but it is subject to change as it is inherently based on a buggy and unofficial way of positioning.

    Check out https://howtotarget.email/ for the latest methods for different email clients.

    For example Outlook window:

    Additionally, this error also applies to IMAP for Yahoo and Gmail (a version of Gmail):

    Outlook.com (must be placed in the style block of the body, not in the head)

    .olm-fragment-custom .your-class-name {
      /* Replace this comment with your styles */
    }

    reply
    0
  • Cancelreply