Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 926
  • Last Modified:

Outlook rule for Re: as the subject

I get a lot of spam with the subject -

Re:

Just 'Re:' but of course I get legitimate emails with Re: in the subject but with other characters as well.

is there a way to identify this with a rule?

Note - the body varies so there is no common phrase.
0
kentgorrell
Asked:
kentgorrell
  • 9
  • 4
  • 2
  • +1
1 Solution
 
Loganathan NatarajanLAMP DeveloperCommented:
what is the script you use to send mail
0
 
kentgorrellAuthor Commented:
What has it got to do with  how I send email?
0
 
Loganathan NatarajanLAMP DeveloperCommented:
do you work with PHP? if use this library, http://phpmailer.worxware.com/index.php?pg=examplebmail
0
Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as high-speed processing of the cloud.

 
kentgorrellAuthor Commented:
no this question has nothing to do with php. this is strickly an outlook question.

I currently have another question regarding an error I get trying to use phpmailer with a web form but it's not related.

This question is purely about spam I receive in outlook.
0
 
los_cmCommented:
I'm nnot sure if these are legitimate emails that your trying to get rid of or just plan old random spam. But I've had a lot of luck using http://www.unsubscribe.com/ the free version allows up to 5 unsubscribes a month. But it has literally help me clean up the junk I've been getting in my email account. So much that I would consider paying for the service. Give it a shot and let me know. Other than that if you could obviously mark the stuff as junk and block it. But for some type of smart rule to figure out what is legit I'm not too sure how to figure that out.
0
 
kentgorrellAuthor Commented:
Thanks los cm but unsubscribing wont' help, each email is from a different address. the only common denominator is the subject "Re"
0
 
kentgorrellAuthor Commented:
I've seen suggestions for using the 'except' eg I add every letter apart from 'r' and 'e' to except and 're' to including.
this may work but my rules wizard is not offerring an 'expect if subject contains' option.
0
 
kentgorrellAuthor Commented:
Hi loqudotcom,
I just noticed I've misstakenly added the php zone to thsi post. Maybe it defaulted from my previous question. sorry.
0
 
kentgorrellAuthor Commented:
Thanks MO.
0
 
TommySzalapskiCommented:
Just set up a rule to run on every incoming mail. Have the rule run a script. Then point it to a macro something like:
Sub CheckMail(msg As MailItem)
Dim destfolder As Outlook.MAPIFolder
Dim ns As Outlook.NameSpace
Dim item As Outlook.MailItem 

Set ns = Application.GetNamespace("MAPI")
Set inbox = ns.GetDefaultFolder(olFolderInbox)
Set root = inbox.Parent
Set destfolder = root.Folders("Junk E-mail") 

  If Trim(lcase(msg.Subject)) = "re:" Then
    msg.Move destfolder
  End If
End Sub

Open in new window

0
 
TommySzalapskiCommented:
I don't think there is a way to do it with Outlook rules without a macro. It seems to only let you search the subject for certain words.

Using Trim and LCase means that it will get all messages like "re:", "RE:   ", "Re:" etc. You might want to use
  If Trim(lcase(msg.Subject)) = "re:" or Trim(lcase(msg.Subject)) = "re" Then
to get the ones with no colon.
0
 
TommySzalapskiCommented:
And yeah, if you are currently viewing a question when you ask a new one it usually adds that zone without asking.
Sorry about that. Hope you have the answer you were looking for now.
0
 
kentgorrellAuthor Commented:
Wow Tommy, that is fantastic.

I'm guessing inbox and root should also be declared as Outlook.MAPIFolder or should I leave them as variants?

I declared them explicitly and setup a rule to call the procedure and it all runs just fine.

Many thanks.
0
 
kentgorrellAuthor Commented:
Brilliant!
0
 
TommySzalapskiCommented:
Sorry, yeah. I pieced that code together from a couple old questions I've worked on here so I missed declaring those.
0
 
kentgorrellAuthor Commented:
Thanks Tommy,

When you are't working in the real VBE it's easy to do.

What would we do without the Compiler picking up our missed bits!

and thaks for the code, it's opened up so many possibilites.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

  • 9
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now