|
|
Fax forward to email applescript
|
|
|
|
Fresh-Faced Recruit
Join Date: Nov 2006
Status:
Offline
|
|
Good Day All,
I'm very happy with my new OS X 10.4 install. But I’m having a bit of difficulty with a feature in OS X faxing. What I would like to do is have faxes that come in forward to an email address but since os x is using its own smtp server and its not an authenticated smtp server the email never gets delivered.
So what i would like to do is to have the mail program automatically send the email using my personal email too two or three email addresses when a fax comes in.
If anyone has any suggestions as to how to do this please let me know.
Jorge Mendez
|
|
|
|
|
|
|
|
|
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status:
Offline
|
|
Have the OS save incoming faxes to a folder, then create a Folder Action for that folder that tells your email client to email any file that lands in that folder.
tooki
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Nov 2006
Status:
Offline
|
|
I found the following under folder actions but i do not know how to customize this to have an email generated when there is a new folder change.
-
on adding folder items to this_folder after receiving added_items
try
tell application "Finder"
--get the name of the folder
set the folder_name to the name of this_folder
end tell
-- find out how many new items have been placed in the folder
set the item_count to the number of items of the added_items
--create the alert string
set alert_message to ("Folder Actions Alert:" & return & return) as Unicode text
if the item_count is greater than 1 then
set alert_message to alert_message & (the item_count as text) & " new items have "
else
set alert_message to alert_message & "One new item has "
end if
set alert_message to alert_message & "been placed in folder " & «data utxt201C» & the folder_name & «data utxt201D» & "."
set the alert_message to (the alert_message & return & return & "Would you like to view the added items?")
display dialog the alert_message buttons {"Yes", "No"} default button 2 with icon 1 giving up after dialog_timeout
set the user_choice to the button returned of the result
on adding folder items to this_folder after receiving added_items
try
tell application "Finder"
--get the name of the folder
set the folder_name to the name of this_folder
end tell
--
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Nov 2006
Status:
Offline
|
|
I’m trying to read and understand the applescript language but I’m having a hard time putting it all together. Currently I have all faxes in Sites/faxes/ directory under a user. When faxes come in they are placed in this folder. I found an applescript to create a new email message, I found an applescript to look at the folder changes but I don’t know how to even go about putting the two together to get what I need. Does anyone have an applescript that does this?
Thank you
|
|
|
|
|
|
|
|
|
Senior User
Join Date: May 2002
Location: Austria
Status:
Offline
|
|
You don't have to use AppleScript for a task so simple. Just use Automator:
Open Automator
Switch to the "Mail" category
Drag the "New Mail message" to the workflow and fill out everything
Drag the "Send outgoing messages" to the end of the workflow
In the File menu, select "Save as Plugin"
Choose "Plugin for: Folder Actions"
Select the folder where your faxes are saved in the "Attached to folder" menu
If you haven't enabled Folder actions already, there will be a check box called "Enable folder actions" you should click.
Click "Save"
That's it. Much easier to use than AppleScript if you're not a programmer.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Nov 2006
Status:
Offline
|
|
Thanks you for your reply and this works perfecty on my OS 10.4 machine...but 10.3 does not have automate....how can i do this in OS 10.3?
Jorge Mendez
|
|
|
|
|
|
|
|
|
Senior User
Join Date: May 2002
Location: Austria
Status:
Offline
|
|
Copy the following AppleScript and fill in the correct recipient:
Code:
on adding folder items to this_folder after receiving added_items
try
tell application "Mail"
set newMessage to make new outgoing message with properties {subject:"Fax received", content:"The fax is attached."}
tell newMessage
make new to recipient with properties {address:"[email protected]"}
end tell
tell content of newMessage
repeat with theItem in added_items
try
make new attachment with properties {file name:theItem} at after the last paragraph
end try
end repeat
end tell
send newMessage
end tell
end try
end adding folder items to
Note: the line 'set newMessage to make new outgoing message with properties {subject:"Fax received", content:"The fax is attached."}' has to be a single line.
Then save the script to your "/Library/Scripts/Folder Action Scripts" folder and attach the script to the fax folder (e.g. with the "Folder Actions Setup" application in the "Applications/AppleScript" folder).
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Nov 2006
Status:
Offline
|
|
Thank you for the script it is working great...If you dont mind me asking did you write the script or where you able to generate the script from the animator actions?
Jorge Mendez
|
|
|
|
|
|
|
|
|
Senior User
Join Date: May 2002
Location: Austria
Status:
Offline
|
|
Unfortunately I had to write the script. I think it's not possible to generate scripts from Automator.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|