How to avoid registration validation emails from being considered spam

The new user validation emails being sent from my server seem to get spam-foldered by Gmail. 

If I send email from my mail client using the same address to an account at Gmail it arrives without being considered spam. So it's not the from address itself that's the problem.

Anybody know why the Elgg validation email is thought by Gmail to be spam?





  • #1, do you have a dedicated IP for your domain?  This will help.  And you should check then on this IP, on different sites like the SPAM filter sites, if your IP is registered there.

    #2, do you have an e-mail address, "" ?  This should be in place for any domain you have.  It is an indication of whether or not your domain is serious about combatting SPAM.

    #3, you should be able to contact Google about this and try and get your domain out of their SPAM lists.

    There are other things that can be suggested, but I would need more information about your set-up and domain.

  • Hi, Yakiv. Thanks for your reponse.

    The domain is hosted at hostgator, so I suppose it's a shared IP.

    There isn't an address, but I can easily add one. However, if that was the problem, email sent from me directly to a gmail account also wouldn't arrive, I imagine. But I can go ahead and add such an address easily.

    I will try to contact Google. But as I said, the entire domain isn't on their spam list. It seems to be just email notifications sent from the new Elgg site I set up today. Other email from that domain, and even email from that address sent directly to a Gmail account seem to work ok.



  • doug, we experienced this as well, but using the phpmailer from Cash, solved it. After all you can then use any smpt server... including the one from Google itself.

  • I will check out the phpmailer from Cash. Is that a plugin for Elgg?



  • douglerner, re:abuse address, there are sites that evaluate spam ranking and you can drop your threat score by simple things like adding the address.  There are lots of little things you can do to help the issue.

    One of the problems with being on a shared environment, at least not having your own dedicated IP, is that your domain gets associated with all of the other domains on that IP.  Sites/search engines/services like Google don't care about you having a separate domain name. They are focused on the IP addresses, as a way to filter out the spammers, both in email and in the search engine.

    On a VPS, you should be able to have your own SMTP set-up, so that you don't have to use Google.  I would not be sending my e-mail through any third party SMTP's.

  • doug, Yakiv is correct - getting through spam filters is not simple and there are services out there that help you evaluate your emails. There are many reasons why emails may be marked as spam (improper headers, content of message, hosting service, etc.).

    The phpmailer plugin will not solve all of these problems.

  • @douglerner, I want to also mention another potential problem. Your target audience. I noticed that you are located in Japan. Where is the server (or where are the servers) for your site (sites)?  I had an issue with one of my sites being hosted in the USA, but my target audience being in Ukraine/Russia.  One of the Russian mail servers really gave me a migrane. Since my site's IP address was from the USA, they didn't like that and were trying to filter me out. I don't know if this would be an issue with Japan. If your target audience is in Japan, maybe you could try a hosting company in Japan and see if that helps. ...Again, I know you mentioned the issue is with Gmail, but you may run into the same problem with other mail providers, maybe one's based in Japan.  And if it is Japanese Gmail, maybe the rules are different?  ...I am just throwing out a lot of brainstorming type thoughts that may help you, based on my experience.  ...By the way, I had to contact the Russian mail service several times and ask them to take my site's IP out of their filters.  Not fun.

  • There are a few other things you can do too;

    1. Add more text to the message that gets sent out. Very short messages are usually flagged as spam and will not help the chances of it getting through (most spam messages are short - 'click here to enlarge your whatsit' etc)

    2. Make sure your server has a RDNS entry (you will have if you're on shared hosting)

    3. Use smtp as the others have pointed out

    4. Install Domain Keys on your server

    5. Make sure that the email from address actually really exists

    Yahoo Mail is particularly difficult to get mail through to - a good option is also to tell users to whitelist the address you are using before registering.

    Hope this helps...


  • Very good points, jimbob. Wholeheartedly agree.

  • Thanks for all your posts, people! (I wish the Elgg notifications included a subject line which included the discussion title.)

    Answering some questions/comments which were posted:

    • I am located in Japan, but the social network I'm trying to start is hosted in my Hostgator account, which is in the U.S. It's a little network for people like me who are trying to diet once again. I might get a separate domain for it later on, but for now I just put it under my main domain: Feel free to visit it, even if you are not overweight. :) At any rate, the Elgg email notifications would be coming from a U.S. IP address.
    • While the new user registration was getting spam-foldered by Gmail, the "so-and-so has become your friend" notification didn't. Maybe that's because I "unspammed" the other notification, I'm not sure.
    • There is a reverse-DNS lookup to the domain.
    • What are "domain keys?"
    • The question about whether the sending email address actually exists or not is an interesting one. I set up a "forwarder" in cPanel so that email sent to the sending address gets forwarded to me. So while no actual separate mailbox exists for that address (dieters at elliptics dot com) mail to that address gets successfully received and forwarded. However, I do that with all the addresses at that domain because I forward everything to Gmail to, ironically, take advantage of their spam filter and nobody else ever has problems with email from me.
    • About adding more text to the notification messages, it would be nice if that could be done through the Administration panel, but it seems it's not there, right? So I need to find and tweak the correct PHP file somewhere. What's the best way to do this in order to ensure that upgrades won't overwrite my modified files?
    Thanks all!