Anti-spam reporting AppleScript for Mail broken in OS 10.7 + (error-1700)

I use the following e-mail spam related AppleScript of KnujOn everyday:

(* Cf. http://www.macosxhints.com/article.php?story=20060219014940761 *)

(* RS 31 July 2006 *)

Set theSpamAuthority to "[email protected]".

(* or your personal Knujon address *)

Tell application "Mail".

Set theMessages to the selection

Repeat with thisMessage in theMessages

Set newMessage make new message coming out at the end of outgoing messages

tell newMessage

the visible value to true (* comment on the line to stop windows 'flashes' *)

define the content of the source of thisMessage

subject to the value "Fwd:"& thisMessage's subject.

brand new to recipient with properties {address: theSpamAuthority}

tell the end

Send newMessage

set read status of thisMessage to true

together been forwarded of thisMessage to true

status of thisMessage spam set to true

end repeat

tell the end

This script worked perfectly for many years on Mail 2 for 10.4 Tiger and 4 mail for Snow Leopard 10.6, exactly as shown above. I'm fighting to move to a new Mac with a new version of OS X I have two: an iMac running OS 10.7.5 Lion with Mail 5.3 and a MacBook Pro OS 10.10.5 Yosemite with Mail 8.2. These two systems are unable to exactly in the same way, with the same error:

"error" Mail was an error: cannot make the source of the message id box 2182618 mailbox \"INBOX/Junk Mail\ ' \"SS IMAP\ account ' type rich text. ' number-1700 of the source of the message id box 2182618 mailbox account "SS IMAP' rich text ' box of RECEPTION/Junk Mail"

This happens with the word "content" in the line of script "set content to thisMessage's source" highlighted.

I studied the AppleScript dictionaries for mail in these different versions of the OS (10.6, 10.7 and 10.4, 10.10):

For Mail 2 on Tiger, source and content are the two 'string. ' String is not defined.

For Mail 4 in snow, source and content are the two "text". Text is defined as "Rich (style) text.

Mail 5 in Lion and 8 Mail in Yosemite, source is 'text' and the content is 'Rich text', defined as 'Rich (style) text.

"Aha!" I thought: ' I need to force the Mail to use plain text to the message form! After days and hours learning (I don't know AppleScript) and experimentation, I finally got the following change to the compilation and tried to run (my changes/additions in bold):

Tell application "Mail".

Set theMessages to the selection

Repeat with thisMessage in theMessages

Set newMessage make new message coming out at the end of outgoing messages

Tell application "system events" to indicate the process of "Mail".

frontmost set to true

Click on the menu "make Plain Text" of the bar menu 1 to menu bar "Format" menu 1 item

tell the end

tell newMessage

the visible value to true (* comment on the line to stop windows 'flashes' *)

define the content of the source of thisMessage

subject to the value "Fwd:"& thisMessage's subject.

brand new to recipient with properties {address: theSpamAuthority}

tell the end

Send newMessage

set read status of thisMessage to true

together been forwarded of thisMessage to true

status of thisMessage spam set to true

end repeat

tell the end

Note that I voluntarily deleted the emitting part and setting of the script at the end (I want to ensure that any changes properly format the message before it shuts down in fact).

Result: same error at the same place.

I checked that the incomplete outgoing e-mail form indeed is set to plain text.

Here's how things are supposed to work:

(1) user manually selects one or more spam messages in Mail, and then calls the script.

(2) for each selected message, the Mail + script creates a new outgoing email message. The body of the message is the raw source of the message spam (inbound). The subject is set to Fwd: + the original subject line. To: address is as shown in the script. Send (from :) address is the user's default in mail.)

(3) each message individually, marked as read, marked as forwarded, marked as spam.

(Note: I tried to paste in formatted AppleScript, but this web form mixed and makes it unreadable.)

I don't know what else to do. I need to this feature, every day! The lack of it crashes me to move to a new version of the OS.

Hoping someone has a solution,

Sonic())

Sometimes it takes separate getting properties various - try this:

set content to (get thisMessage's source)

Tags: Mac OS & System Software

Similar Questions

  • Outlook for Mac, anti-SPAM, but not on iPhone or webmail

    I have a Macbook Air running Microsoft Outlook for Mac 2015 (version 15.24).  I have several e-mail accounts managed by Outlook.  I often get emails from spam/spam in Outlook, but the spam/junk e-mail does not appear on my iPhone or webmail interface (in all including unwanted folders, inbox etc..)  It only appears in Outlook.  And lately the frequency and the number has increased.  I ran several anti-spam, adware, spyware, programs etc, but no luck finding anything.  Any ideas on what I can do?

    First, determine what email account spam comes in. Chances are that it is a story that is not configured on your phone or is configured as a POP3 account, resulting in messages being deleted from the server once downloaded by Outlook.

    Then see what kind of this e-mail provider of server-based spam filtering offers.

  • How to stop the McAfee anti-spam folder appear in Windows Mail?

    I know I've done this before, but I just had to reinstall the operating system and forget how to stop the McAfee anti-spam folder to appear in my Windows Mail Inbox.

    Help!
    Thank you!!
    It should not appear in the Inbox WinMail, but rather a clean folder. The best way to stop it from appearing anywhere descend McAfee of your machine.
     
    Norton and McAfee are the two least friendly Windows security and swine resource to start programs. My ISP offers the McAfee security suite for free and I refuse to use it.
     
    I used to use Avast in conjunction with Windows Defender, (still a decent option), but since MSE became of age, I have used which. MSE is an anti-virus, Anti-Spyware and Anti-Malware program all in one. IMO, it is a program MS got it wrong. And all of these options are freeware.
     
    If you choose to give it a try, download and save the MSE. Remove McAfee and install MSE.
     
     
    Correction of tool McAfee Consumer Product Removal triple
    http://service.McAfee.com/FAQDocument.aspx?LC=1033&ID=TS100507  
  • Aid for the creation of anti-spam on site

    I could do with a little help

    I am creating a form of anti-spam honeypot for the site from a friend, but I can't make it work.

    I put it in a jar of honey ordinary and time

    On the page of the form

    < class = "end-para" p > simply fill out the form below, including all necessary details and one of our friendly and experienced customer service team will be happy to remind your time choice. < /p >
    < are method = "post" action = "callback.php" >
    < fieldset class = "site-forms" >
    < p > < class label = 'contact-fields' for 'name' = > your name: < / label >
    < input type = "text" class = "login" name = "name" id = "name" / > < / p >

    < class li 'Robotics' id = 'pot' = >

    < label for = "robotest" > if you're human leave this field empty: < / label >

    < input name = "robotest" id = 'robotest' class = 'robotest"type ="text"/ >

    < /li >

    < p > < class label = 'contact-fields' for 'email' = > E-mail address: < / label >
    < input type = "text" class = "identifier" = "email" id = "email" / > < / p >
    < p > < class = 'contact-fields' label for = 'phone' > phone: < / label >
    < input type = "text" class = "login" name = 'Phone' id = 'phone' / > < / p >

    < p > < input type = "hidden" name = "loadtime" value = "time (); "/ > < / p >

    < p >

    < / fieldset >
    < fieldset class = "site-forms" >
    < p > < class label = "contact-fields" for = 'time' > when want us to call you? < / label > < / p >
    < input type = "radio" name = "best_time" value = "call me during the day (09:00 - 17:00)" > call me during the day (09:00 - 17:00) < br >
    < input type = "radio" name = "best_time" value = "call me at night (17:00 - 21:00)" checked > call me at night (17:00 - 21:00) < br >
    < input type = "radio" name = "best_time" value = "call anytime" > call me anytime < br >
    I would prefer to be emailed < br > < input type = "radio" name = "best_time" value = "I would rather be sent" >
    < class p = 'form-notes' > < small > < strong > note <: facilities > we will try to call you at the point where you have selected and within the 1 business day. < / small > < / p >

    And on the next page

    <? PHP

    $name = $_REQUEST ['name'];

    $robotest = $_POST ['robotest"];

    $email = $_REQUEST ['email'];

    $telephone = $_REQUEST ['phone'];

    $loadtime = $_POST ["loadtime"];

    $best_time = $_REQUEST ['best_time'];

    {if($_POST)}

    $robotest = $_POST ['robotest"];

    If ($robotest)

    $error = "sayonara Mr. Roboto.";

    else {}

    $success = ' your message has been sent! ";

    }

    If ($Success)

    echo "< div class = 'msg success' > '." $success. "< / div > ';

    }

    $loadtime = $_POST ["loadtime"];

    $totaltime = time() - $loadtime;

    If ($TotalTime < 5)

    {

    ECHO ("you took less than 5 seconds to complete the form, blah blah blah");

    "exit";

    }

    If (! isset($_REQUEST['email'])) {}

    header ("Location: http://www.windowfixuk.co.uk" "");

    }

    ElseIf (($email) empty | empty ($telephone)) {}

    Can anyone suggest what is incorrect or ways to improve overall upward?

    Thank you

    Dowifi wrote:

    I am a bit confused about the loadtime honeypot as loadtime is supposed to stop the msg if the person takes less 5 seconds then to fill the page, then he was not supposed to be anything to fill.

    The two solutions are the same. Only a robot will fill in the hidden field, so no matter if it takes 2 seconds or 20 seconds. The original solution, you use timing controls that seem unnecessarily complex for me.

    All its saying (you need to be a robot because you took 5 seconds to complete the form field). The form field is always filled in so check that instead... as I said it doesn't matter if a robot takes 2 seconds or all day to fill the field of form - which is something is in the form field.

  • Can't find the email that I need to get back in the Spam report and not in the junk e-mail folder.

    I regularly get Spam Report emails in Mozilla Thunderbird, but I don't know how to retrieve those that I I want off that e-mail. I checked the spam folder, and they are not in. How do I find/recover these?

    I use a MacBook Pro, OSX 10.9.3 version

    Thank you!

    Thunderbird does not use the term Spam and I do not believe that it delivers any form of Spam report. It can receive one issued by your email provider. I sign in to your account to your web e-mail providers page and check their spam folder to see what is there.

  • Hello! I have already repeatedly sent an invitation to a new user of creative cloud. This invitation never reaches the level of the receiver. Or even anti-spam filter in the other mailboxes this mail to find. Is it because the word testuser occurs in the

    Hello! I have already repeatedly sent an invitation to a new user of creative cloud. This invitation never reaches the level of the receiver. Or even anti-spam filter in the other mailboxes this mail to find. Is it because the word testuser occurs in the mail?

    Hi Eric, if you have tried all the steps from the link mentioned in the previous post, please Contact Customer Care

    Atul_Saini

  • No support TLS with comprehensive anti-spam Service?

    I have a NSA240 (SonicOS Enhanced 5.9) with the active anti-spam service.

    The question I have now, that all E-Mail traffic to the firewall is done without active TLS.

    Can you please tell me if this Service is not supported TLS or how I can enable.

    The smtp test reports the following:

    [000.171]

    Connected to the server

    [000.657]

    <>

    mia0vm - cass04.colo.sonicwall.com 220 ESMTP SonicWALL (8.0.1.2353)

    [000.657]

    We are allowed to connect

    [000.658]

    -->

    EHLO checktls.com

    [001.642]

    <>

    250 mia0vm - cass04.colo.sonicwall.com
    250 8BITMIME
    250-ENHANCEDSTATUSCODES
    250 100000000 SIZE

    [001.642]

    We can use this server

    [001.643]

    TLS is not an option on this server

    I suggest you ask your sales representative to open a feature request for the ability to support TLS with CASS.

    One thing you could do is ask your representative to sales for the free trial Email Security Virtual Appliance or software Windows.

    It is much more robust and supports TLS.

  • Stopped services: anti-spam

    Hello

    Quick question here, but would need a quick answer because the customer does not receive emails more.

    We had a power failure, then had to reload everything when the power came back.

    I have restarted the Spam Blocker when all servers have grown and ready, as it is by using Active Directory.

    System seems to work fine, except for the fact that when I do a status in the CLI, I get the following:

    Status of the: kill Aug 02 10:52:16 EDT 2011
    Distance from: kill Aug 02 10:03:15 EDT 2011 (49 m 1s)
    Zero counter last reset: never
    System status: paused on services: anti-spam
    Older message: 1 hour 17 minutes 37 seconds
    Featured - Bounce verification: Perpetual
    Feature - IronPort anti-spam: 212 days
    Feature - Incoming Mail Handling: Perpetual
    Feature - Sophos Anti-virus: 212 days

    I read somewhere that I could be caused by an invalid function key, but as you can see, everything is up to date and.

    I'll try to find the correct command to force the device to replace active Paused in the command line, but have not yet found anything.

    Can someone help me?

    Thank you!

    Mathieu

    Hello

    Can you please check what said "antispamstatus CLI command?" If it is has a n/a in it somewhere, and then call the support hotline to get the anti-Spam fixed.

    Thank you and best regards,

    Martin

    ---

    Envoy while being on the road. Please excuse typos typing and short answers.

    Von: [email protected] / * /

    Gesendet: Tuesday, August 2, 2011 17:10

    Year: Martin Eppler (meppler)

    Vacancies:-pause on services: anti-spam

    Cisco support community

    Stopped services: anti-spam

    created by [email protected] / * / in blocker Spam & Virus Business small - see the discussion complete

  • Make a Contact form anti-spam working

    I can't get this anti-spam .php code works, important note: the coding worked before I added the label/.php anti-spam code. The obvious flaws in the coding?

    HTML:

    < link rel = "stylesheet" href = "css/site-comments-part - two.php" type = "text/css" media = "screen" / >

    < are method = "post" action = "site-comments-part - two.php" >

    < label > name < / label >

    < input name = placeholder 'Name' = 'type here' >

    < label > Email * < / label >

    < input name = "email" type = "email" placeholder = "Type here" >

    < label > suggested Feedback * < / label >

    < name textarea = placeholder "message" = "Type here" > < / textarea >

    < label > what is (20 + 5) / 5? (Anti-spam) * < / label >

    < input name = 'human' placeholder = "type here" >

    < div > < input id = "submit" name = "submit" type = "submit" value = "Submit" > < / div >

    < / make >

    PHP:

    <? PHP

    $name = $_POST ['name'];

    $email = $_POST ['email'];

    $message = $_POST ['message'];

    $from = ' from: Contact form ";

        $to = ' [email protected] ';

    $subject = "site feedback";

    $body = "from: $name\n E-mail: $email\n Message: \n $message";

    If ($_POST ['submit']) {}

    If (& & $human == '5') {}

    If (mail ($subject, $body, $to, $from)) {}

    echo "< p > your message has been sent! < /p > ';

    } else {}

    echo "< p > something went wrong, go back and try again! < /p > ';

    }

    } else {}

    ($_POST ['submit'] & & $human! = '5') {

    echo "< p > you answered the anti-spam question wrong! This means that your message has not been sent < /p > ';

    }

    }

    ? >

    Thanks for the help.

    <>

    $name = $_POST ['name'];

    $email = $_POST ['email'];

    $message = $_POST ['message'];

    $from = ' from: Contact form ";

    $to = ' [email protected]';

    $subject = "site feedback";

    $body = "from: $name\n E-mail: $email\n Message: \n $message";

    {if (isset($_POST['submit']))}

    If ($_POST ['man']! = 5) {}

    echo '

    You answered incorrectly the anti-spam question! This means that your message has not been sent

    ';

    }

    else if ($_POST ['man'] == 5) {}

    mail ($ $subject, $body, $from);

    echo '

    Your message has been sent!

    ';

    }

    else {}

    echo '

    Something was wrong, go back and try again!

    ';

    }

    }

    ?>

  • I received 3 emails - "anti-spam feasibility" of Server Administrator - these are authentic or not?

    Emails containing the following message is displayed:

    Your webmail Quota exceeded it's set/Quota limit which is 20 GB.

    You're running on 23 GB, due to hidden files and your mailbox from the folder.

    Please CLICK HERE to activate the anti-spam engine and increase your Quota of Web mail.

    Enable anti spam engine and increase your webmail Quota can lead to loss of important data / information and Documents in your mailbox / or cause limited access. Thank you

    Ask your email provider if they have published messages. It's their server. Thunderbird only delivers messages. They do not issue them.

  • FRAUD! SCAM! ANTI-SPAM!

    Please, please, please, download these guys here, it's the 2nd e-mail I rteceived the last time I clicked on it and cancelled my payment because I have NOT allowed Skype to take money from my account...

    The last time that my account has been hacked and it causing major problems, paypal have been aware of this and I really think that Skype needs to address this as well.

    FRAUD! SCAM! ANTI-SPAM!




    TO ALL

    Please file here:

    Contact customer service

    TIME ZONE - US EAST. LOCATION - PHILADELPHIA, PA, USA.

    I recommend that you always run the latest version of Skype: Windows & Mac

    If my advice helped to solve your problem, please mark it as a solution to help others.
    Please note that I usually do not respond to unsolicited private Messages. Thank you.

  • Why can't find an anti spam device that works with skymail

    I can't find an anti-spam system that works with skymail

    Hello

    Anti-spamming devices are hardware solutions integrated with edge-based anti-spam software and are normally driven by an operating system optimized for spam filtering.

    You can check if Microsoft Security Essentials will meet your needs. http://www.Microsoft.com/security_essentials/

    If this isn't the case, you may search online or check with the manufacturer for the same thing.

    WARNING of THIRD PARTY SOFTWARE: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

  • How to configure anti-spam to block addresses email not valid

    We receive a lot of spam that (fortunately screenshots of anti-spam) are directed to a non-existent user in our Organization. Is there a way to configure anti-spam to reject completely?

    I have a TZ205 with comprehensive services. firmware update

    Antispam on the firewall is no not no matter what filtering of recipients.

    Antispam on the firewall uses a Proxy connection and depends on the mail server to reject invalid recipient.

    The complete Email Security product rejects invalid recipients (Protection of DHA)

    The Hosted Email Security currently does not DHA Protection but it is added at a later date.

  • Thunderbird by failing to check for mail. Must be done manually. RESOLVED by 38.3.0

    About two weeks ago or so, Thunderbird stopped checking for mail. I always got it for 3 minutes and it's always worked so far. So now, I have to manually hit "Get Messages" to receive my mail. Find out how to fix this?

    Thank you!

    JQW

    Please update to version 38.3.0 which came out today.
    Is this better?

  • Recently upgraded to El Capitan, I had that problem for Mail stop unexpectedly when I saw some posts.  I followed the steps and was able to remove the trouble messages.   Now I can't restore the mail window message viewer component.

    Recently upgraded to El Capitan, I had that problem for Mail stop unexpectedly when I saw some posts.  I followed the steps and was able to remove the trouble messages.   Now I can't restore the mail window message viewer component.  When I try to catch the separator bar to go back to the left, only half of the small arrow icon and line appears, and it cannot be moved.   Can open the message by double clicking a message viewer.

    Hi there, alicefrompa!

    Thank you for using communities Support from Apple. From your post, I understand that you do not see the Message Viewer box which allows you to read your e-mails; only see you the Inbox that includes a brief overview of the message and are unable to restore access using the separator bars. I have had this happen to my own Mail app and am happy to let you know how I could fix!

    You are really on the right track - you want to roll your mouse over the divider between the Inbox and sections Message Viewer (which should now be on the extreme right edge of your mail window) and drag it to the left.  When you click on the receipt/Message Viewer box, the cursor turns into a line continuous black with a single arrow pointing to the left. When you see the cursor change, click with the left button of the mouse and (while holding down the mouse button in) drag the combination line / arrow to the left. You may need to drag a little further than before to get it. I had to hang mine almost completely in the middle of my Mail app before the display of the message box appeared.

    From there, you should be able to adjust the boxes to your widths you want as expected.

    If you are still not able to get the display of the messages visible after have try this, here are a few more things that you can do.

    1. Press command + O on your keyboard.
    2. Exit the Mail application, and then press on and hold the SHIFT key on your keyboard while reopening.
    3. Restart your Mac by selecting the menu  Apple in the upper right of your screen restart from the menu drop down.

    See you soon!

Maybe you are looking for

  • Satellite P200-1 webcam darkens when the brightness decreases

    Hello! I have a little problem with this f * ckin' camera: when the sun goes to bed, and when the brightness decreases, my cam become dark (on msn, for example) I installed the latest drivers, but the problem is still there... you have a solution?

  • I can't do OR DAQ AO1 send signals

    I developed a program in LabVIEW to send a trigger signal to a camera. Initially, I had used AO0 data acquisition to trigger the camera and it works fine. Now, I'm just trying to use instead of the AO1 (by simply changing the code) and it does not tr

  • Oversized VMs

    Is there an easy way to generate a report of the VMs that are size too (too much CPU memory, too much allocated disk space)?  I thought that I remembered, given that in some demos, but I find no references to him in the docs that I checked. If it's i

  • My laptop Dell XPS 17 (L702x) does not recognize an SSD pro Samsung 840

    Hello I buy all my first SSD for my laptop Dell XPS 17 (L702x) (8T7CQS1). I managed to install the Samsung 840 pro (MZ-7PD256BW) at the HARD School of XPS drive, but the BIOS does not detect as a second HARD drive. My BIOS version is the most recent:

  • Repeat the same interview at the OPA 12 screens

    Hi guys,.I have a requirement that repeats to flow. A workflow consists of 3 or 4 screens that collects information from a single entity at the end of these flows, we provide a Boolean attribute to check if the user still wants to repeat the process.