How does Gmail recognize email signatures (alternatively, "What's the best way to recognize email signatures?") - email

Gmail automatically greys text that looks like a signature. Anyone have any guesses how it does this? (I've noticed that it depends on the presence of the sender's name, but I think that's only part of the story).
I ask because I'm working on a web application that has an email interface, and I'd like to remove users' signatures before displaying the contents of their emails.

Email signatures are supposed to be started with two dashes, a space, and a newline.
See Wikipedia and RFC-3676

Related

Any advantages to including recipient's name in email headers?

Are there any reasons (Spam, etc.) to include the name in the To: headers instead of just omitting them and only using the address?
No, it just looks pretty, that's mostly it.
When you're sending mail to multiple people it can be useful when some of the recipients' email addresses don't easily map to their names.
It usually displays in your email client. If you leave it out, it simply displays <example#test.com> instead of Example Test <example#test.com>.
Im guessing it might be a factor for spam detection too (so adding the recipients name makes it more likely to show up in the inbox)

HTML email going to spam

Not sure if this is in the right place, but it's all stemming from a PHP email send script that isn't working.
I have an email server for my clients that exists at email.thoughtspacedesigns.com. I run multiple domains from this server (e.g. pittsburghphotography.co). I've set up SPF and DKIM for these external domains, and plain text messages are going through just fine, but anything that contains an HTML attachment (even if it's accompanied by plain text) is going directly to spam when sent to any gmail account. So for example, if I send an HTML email from contact#pittsburghphotography.co, regardless of the client I use (Mac Mail, WordPress, pure PHP script), it goes into spam. I'm not sure what I can do to circumvent this issue as I've already set up just about all of the verification factors I thought were possible. Any insight?
Emails can get sent to the spam folder for a variety of reasons. Here are some things you might look into:
Every email server has a numbered rating and that can effect how your email is delivered. Check that at senderscore.org.
Another thing you might look into is if your email server is on any "Black lists" meaning that you tanked your senders score and got put on a list as a know spammer. Don't feel bad if you are, it's easy to wind up on one. Check for that at blacklistmonitoring.com.
Also, a simple way to check for spam keywords is isnotspam.com. There are other spam checkers out there but that's the one I like.
EDIT: I also forgot to mention gmail can be a bit more fickle than other email clients when it comes to spam. It's just something in their spam filtering algorithm that is more sensitive than other applications.
Best of luck!

Gmail username collapsing

I noticed that the following gmail addresses are equivalent: foo#gmail.com and f.oo#gmail.com, and I would like to collapse these equivalent email addresses in a single category. I searched on the Internet about the gmail collapsing rules, but I didn't find anything. Do you have any idea of how can I normalize the gmail addresses?
P.S. By equivalent I mean that if I send an email to f.oo#gmail.com, then I will receive it in my mailbox, i.e. foo#gmail.com.
P.P.S. I think that somebody asked for the same question here: What emails are equivalent to each other?, but no correct answer was given. Maybe I should close this thread?
The GMail rules work like this:
Case is ignored.
Dots are ignored.
A plus character and anything following it is ignored.
You could thus normalize GMail usernames by first lowercasing the string, then removing all dots, then truncating the string right before the first plus character.
Note that these rules are specific to GMail. (Ignoring case in usernames is fairly universal but apparently not required by the relevant standards.)
Users may be angry if you send them email at "stripped" addresses. If someone gives you the address joe+yourapp#gmail.com, that's generally because they want to be able to filter the output from your application. If you then send mail to joe#gmail.com, you're sort of going against the user's explicit wishes.

Display email in recipient's language?

I'd like to send an email message that contains multiple translations. The correct translation should be displayed according to the recipient's language preferences. Possible?
There is nothing in the email message format that will let you do that. What you can do instead, is to put translated contents as attachments, or post some (translated) links to your website, that will refer recipients to translated contents.
Anyway, I think it is best to store language preferences in the user profile (provided you have one) and use this information for customizing emails. That works well, unless you are sending messages to group of people...
To the best of my knowledge, email accounts are protected from getting any information about the recipients unless they provide it. Even email clients often prevent emails from displaying pictures, since it reveals the recipient's IP address. So I also think, it's unlikely to be possible.
I agree with the idea of Pawel Dyda.

Is it safe to generate an email subject from the body?

I'm writing an app which allows users to send out a text-only email to a bunch of recipients. I want to try and generate the subject of this email from the body of the message, to avoid the need for a subject field
Is it safe enough to do this? Are these emails likely to fall foul of spam filters?
I'm already scanning the entire email for spam words, so there won't be any in the subject
you could download the widely used spamfilter Spamassassin and search for 'SUBJ' in the *.cf files, this will give you many spamrules that trigger based on subject (like empty subject, all caps, bad words, bad encoding of non-ascii characters etc)
I would suggest that if the mail is from a trusted source then there is not a problem. On the other hand since the mailbox dosent know that the subject is generated automatically it does not matter to them. And the third thing is that you need to check the guidelines that the email filters follow. Check out some ope source mail filter.