Applescript to remove undeliverables in Mail.app ?

2 replies [Last post]
cwsmith's picture
Offline
Joined: Oct 13 2005
Posts: 699

I have a regular client who has a recurring PEBCAC problem. I'll get a call about once a week from her, saying that mail comes in but won't go out. A 20-minute drive and a 2-minute check of her outbox reveals improperly-addressed emails blocking the outbox, and nothing else can go out because of these undeliverables. Common errors include the following (types of) addresses:

www.iastate.edu [or other http:// address instead of email address]
• no-reply@amazon.com [or similar]
• [no address entered]
• [subject line typed in BCC: field]
• username [without @server.com appended]
• [person's full name typed in To: field]

My question is this: can a rule or Applescript be applied to Mail.app that would either delete these undeliverable messages, or redirect them to an "Undeliverable" folder, so that properly-addressed mails can be sent? This would save my client multiple visits (and bills) from me, and would save me fixing the same problem over and over again. I'm sure it would be useful to others here at 'Fritter as well.

Any Applescript geeks want to take this one on?

Side note: could an admin remove any unintentional links in the list above?

__________________

Dozens of Macs; a handful of PCs; Apple ][e, ][c and ][gs; a few iPods; lots of parts
17 guitars, 2 baritone guitars, alto guitar, 6 bass guitars, bajo sexto, 3 ukuleles, mandolin, banjo, sitar
3/4 scale upright bass, 4pc drum kit, congas, travel congas, bongos, cajon, cabasa, 12 harmonicas
http://www.cwsmith.fmhttp://www.facebook.com/cwsmith2620

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Dr. Webster's picture
Offline
Joined: Dec 19 2003
Posts: 1687
I don't use Mail.app, but I f

I don't use Mail.app, but I find it pretty stupid that it would cause one message with a malformed send-to address to prevent other, legitimate messages from being sent...most mail clients I've used will either try to send the message anyway, or will time out on the malformed message and skip to the next waiting to be sent. Perhaps you should have her try Entourage?

I also assume that trying to teach her to not type random crap into the To: fields hasn't worked? If it's a PEBKAC problem, typically some user education is the best solution...having an automatic nanny to clean up after her only justifies her bad habit.

__________________

Applefritter Admin

cwsmith's picture
Offline
Joined: Oct 13 2005
Posts: 699
Believe me ...

These are things I've talked about with the client before. I've explained the problem to her, and tried to explain how a proper email address should look, but it goes in one ear and out the other. Education only works when the student is working at least as hard as the instructor.

My client is 80+ years old, and changing her mail client would splinter her universe. The Applescript or rule solution is the best workaround I can come up with to at least keep her up and running between more serious problems.

__________________

Dozens of Macs; a handful of PCs; Apple ][e, ][c and ][gs; a few iPods; lots of parts
17 guitars, 2 baritone guitars, alto guitar, 6 bass guitars, bajo sexto, 3 ukuleles, mandolin, banjo, sitar
3/4 scale upright bass, 4pc drum kit, congas, travel congas, bongos, cajon, cabasa, 12 harmonicas
http://www.cwsmith.fmhttp://www.facebook.com/cwsmith2620