Mail Rule Applescript....

Hey I am looking for someone to write a simple script here is what I am trying to achieve:
I am making a rule in Mail that says:

If any of the following conditions are met, the contains
Perform the following actions

I would like the applescript to attach a word document that is in my documents or on my desktop to the resume if those conditions are met. Is this do-able?

You realize, of course, that Mail rules only apply to incoming mail, right? Are you wanting to attach a specific document to a certain population of outgoing messages? That sort of thing is easily scriptable; it only depends on how you want to put it together. For example, a one-time use for a blast of messages, or a few messages at a time over a period of days, weeks, or months?

I would like this script to work all the time 24/7 anytime and email goes out with resume in the Message area that it attaches my resume, main reason is to prevent flaw. I have accidently sent out job requests and forgot to attach my resume and it looks bad on my part. So I would like to eliminate this from happening.

I believe that the simplest solution is going to be using a script to generate a Mail message and send it off with the proper attachment. You would need to input the receiver’s address and the text of the message, and the script would generate a Mail message, attach the proper file, and send it off. I do not believe you can use Mail rules for outgoing messages.

Ok as long as it accomplishes the task I want, are you able to make a script that will do this?

Sure. Give this a try. It is basic, but will get the job done. It could certainly be made fancier, but try it out and see what you think:

set the_text to text returned of (display dialog "Enter the body of the e-mail message:" default answer "")
set the_recipient to text returned of (display dialog "Enter the  e-mail address of the recipient:" default answer "")
set the_resume to (path to desktop as Unicode text) & "DiscData.txt" --Here is where you identify the location of the resume file
set the_message to "To whom it may concern:" & return & return & the_text & return & return & "Sincerely," & return & "Bullwinkle, the Moose." --This line builds the body of the email, so you can use the same salutation and sign off every time.
tell application "Mail"
	set b to make new outgoing message with properties {sender:"xxxx@yyyy.net", subject:"Application"} --Here is where you put your own email address, and the subject line.
	tell b to make new to recipient
	set content of b to the_message
	tell b's content
		make new attachment with properties {file name:the_resume as alias} at after the last paragraph
	end tell
	set address of first to recipient of b to the_recipient
	send b
end tell

Good luck,