I'm trying to test out forwarding, filters, and spam. I want to see how a spam message will be affected by my current configuration.

I want to send myself a message that will show up as spam in my Gmail address.
How can I do this?

Notice how this is not asking how to send a spam message that won't be caught by the gmail filters... it's asking the exact opposite.

Ideally, the solution shouldn't cause my email address to go on some global black list on gmail's servers. If your method does cause this sort of thing, please mention it so that people trying it out will take care to use a test account they don't actually use.

Please don't offer a solution which doesn't answer the question above and instead focuses on a solution for this specific example. The reason being that my criteria could change tomorrow and I might have some other reason to test spam messages.

Things I have tried which didn't work:

  • Sending an email with no subject and no body
  • Using "viagra" in the subject line
  • Using random symbols in the subject line

Things I don't want to try:

  • Reporting a message as spam on the receiving account. I'm afraid Google might think it's actual spam and because I'm using a gmail address to send the message, I might be in violation of the agreement, or they may report my information (e.g. IP address I used to sign up for gmail) to some other authority.

5 Answers 5


Use the Generic Test for Unsolicited Bulk Email (GTUBE). It's a standardized spam signature used precisely for testing spam filters.

Put this in the body of the test email:


and it will force it to be recognized by Gmail as spam.

  • I just sent out messages to my closest friends including this string and a "THIS IS ONLY A TEST" subject line. Can't wait to see the responses I get. However, I wonder if saying TEST will skew the results.
    – SDsolar
    Apr 7, 2018 at 1:51
  • This is not a "spammy" email test. GTUBE gives a virus signature only. This can be a different result depending on your MTA/MDA setup. Meaning: Your server may deal with a virus signature differently as opposed to 'ordinary' spam emails. Though, it may work with Gmail per OP question, I'm not sure if it would punish the sender within Gmail. Hopefully, Gmail ignores testing with GTUBE as far as reputation of sender since it's a (known) virus test.
    – B. Shea
    Jun 12, 2019 at 17:25

What I ended up doing, which worked really well, was creating an email with some text in the body:

This is a test of the email system. This is not a real spam message, but rather one that is trying to purposely get into the spam folder of another account. This is so that I can ensure that my Gmail filters are setup correctly.

... and a subject line such as:

Test Spam Message 1

I always incremented the number at the end of the subject for each message I sent. This way it doesn't look like a duplicate to Gmail and is actually delivered.

Next, on the receiving account, I decided to go ahead and mark the message as spam. I read in the help that it mentions that marking a message as spam is reversible. They even give an example of how a user might accidentally mark a message as spam, then undo it. This is exactly what I am hoping to emulate.

After marking the first message as spam, all the others (which contain the exact same body and only differ in the subject by one letter) are sent to spam as well.

Once I was done with the testing, I marked all the messages as non-spam. Hopefully Gmail treats this as a user accidentally marking a message as spam and doesn't resort to blacklisting the address or doing something worse.

Update: After trying this again, I had to mark a message as spam twice before anything started happening, and then I noticed weird behaviors on the account that was sending the "spam". The account was automatically logged off, and I couldn't log back in for a while. This might be an automated measure Gmail takes when users report other Gmail users as spammers.

  • Yikes. Great test. But from what you said it probably isn't a good idea to do this kind of testing from my main account. Maybe it should be done from protonmail or yahoo...
    – SDsolar
    Apr 7, 2018 at 1:52

This will only help you if you can do a bit of programming:

  • set up an SMTP client (e.g. if you are on Windows, install IIS and SMTP support)
  • write a program in your favorite programming language that will send the email message and have it use your local SMTP server
  • use a random, invalid email for "from"
  • put "viagra" in subject and body for good measure

I would think that would do it.

  • Hah! Yep, that would probably do it. The "from" alone is a trigger. And there are keywords. Check out the comments to the OP for links about all that. I'm still LOLing. -> I would suggest sending it as plain ASCII instead of HTML, too.
    – SDsolar
    Apr 7, 2018 at 1:55

Logically if you repeatedly send emails that gmail interprets as spam then your email account will become a candidate for going on a blacklist. So I would start out with a throwaway test email rather than one you might want to use again.

Secondly the easiest way to simulate spam is to farm the farmers. Why not just put the test email account as a plain link on your homepage - you can then guarantee that spam will be targeting that account within a few hours.

  • Thanks for the suggestion. I'm looking for a way where I can control exactly when a message is sent rather than getting flooded by too many messages, or, on the opposite side of the scale, waiting too long until I get the next spam message. The ideal situation is if I can consistently send myself a spam message.
    – Senseful
    Aug 17, 2010 at 22:11
  • For what purpose?
    – SDsolar
    Apr 7, 2018 at 1:54

Sure there are ways to trigger spam filters on purpose, some of which are shown in the comments to the OP.

Here are some ways to tilt the odds:

Invalid "from" lines, for one.

Subject lines that are totally different from HTML content that appears to offer a great deal but you had better act now before this free offer expires. But wait, there's more. For only $9.95 we will send you a book that tells you how to get people to send you $9.95. You can get rich in a month if you use spammonkey.com to distribute it to all your twitter and facebook followers and friends. Just download our free program which willl collect all your information for distribution. It is just a few clicks on your part and the rest is automatic. They will love it. SUBJECT: Happy Birthday Grandma Uffda!

Fake "unsubscribe" links that are simply a mailto:[email protected] or something like that.

Not the answer you're looking for? Browse other questions tagged or ask your own question.