Automatic Delete EMails with no message content

Is there a way or rule in Outlook Express where you can automatically send an email with an empty message box to the delete bin as this seems to be on the increase getting this type of rubbish.

Many thanks
LVL 1
PeterWhittsAsked:
Who is Participating?
 
war1Commented:
Greetings, PeterWhitts !

Outlook Express does not have a specific option to delete blank body.  You can try setting a rule to delete the email if the body is " ".

Mailwasher program has an option to delect blank message.  This spam blocker is free.
http://www.mailwasher.net/

Best wishes!
0
 
alifaikCommented:
Hi Peter
you might write a macro, that checks on receiving an email(after getting it) whether the body is empty or not and then forward it to the "deleted"
0
 
PeterWhittsAuthor Commented:
alifaik

Do you have suggestions for the code and how do I implemnt it in Outlook Express
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
alifaikCommented:
Hi here is the code :



Private Sub Application_NewMail()

    Dim myExplorers As Outlook.Explorers
    Dim myExplorer As Outlook.Explorer
    Dim myFolder As Outlook.MAPIFolder
    Dim myMailItem As Outlook.MailItem
    Dim i As Integer
   
    Set myExplorers = ThisOutlookSession.Explorers
    Set myFolder = ThisOutlookSession.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
      For Each myMailItem In myFolder.Items
       
        If Not myMailItem Is Nothing Then
            If myMailItem.Body = "" Then
                myMailItem.Delete
            End If
        End If
    Next myMailItem
   
 
End Sub


-----------------------------------
to paste it in the VBE:
1) ALT + F11 to open the VBA Editor
2)in the left collapse the "Project1(VbaProject.OTM)"
3)the collapse the folder "Microsoft office Outlool Objects"
4)choose or double click the "ThisOutlookSession"
5)paste the code into the Pane to the right, then save and close the VBE , the code will work automatically each time you receive a new email in the inbox, furthermore it will check for previous emails with empty body the first time it works

Enjoy!!

0
 
PeterWhittsAuthor Commented:
ALT + F11 to open the VBA Editor  does not seem to work in Outlook Express and I do not want to use Outlook.
0
 
alifaikCommented:
you have stated in your question outlook express  "s there a way or rule in Outlook Express where..."
but this code is not for outlook express, it is for "Microsoft Outlook" the one that comes with office, there is difference between the two, the former is just has some limited functionality the latter has calenders ,tasks ....

so to open the VBE open "Microsoft Outlook" then choose tools, then Macros then Visual Basic editor then
2)in the left collapse the "Project1(VbaProject.OTM)"
3)the collapse the folder "Microsoft office Outlool Objects"
4)choose or double click the "ThisOutlookSession"
5)paste the code into the Pane to the right, then save and close the VBE , the code will work automatically each time you receive a new email in the inbox, furthermore it will check for previous emails with empty body the first time it works


greets
0
 
alifaikCommented:
sorry I misunderstood, u meant u didnt want to use Microsoft outlook. I dont know a way in outlook express, it does not support even macros.

I hope someone else knows another way rather than installing the above mentioned program.
0
 
PeterWhittsAuthor Commented:
>>You can try setting a rule to delete the email if the body is " ". << This does not seem to work but I will try the MailWasher.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.