• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem in forcing forward email on Mail.app using diferent account...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem in forcing forward email on Mail.app using diferent account...


  • Subject: Problem in forcing forward email on Mail.app using diferent account...
  • From: Bernardo Hoehl <email@hidden>
  • Date: Thu, 22 Oct 2009 14:50:36 -0200

Hi folks,

It has been a long time I don't post here. Please forgive me for being away.

Problem:

I have an old Mac in my LAN that used to work as an email server (postfix server).

We moved its domain to another server outside our company.

In order to maintain a fax receiving routine we kept the server running locally, since it receives faxes on a modem (believe me, there are still people out there who still use faxing), and unix's efax forwards the PDFs to a dozen mail accounts in our LAN. (the server can not send email outside our LAN since it has no valid IP address)

I am trying to make my Desktop computer, to use a Mail.app rule to forward me the email and attached PDF to another email account, but it can not use the very same email account it received.

Can someone be so kind to point me why the following code works ok on my MacBook air running Snow Leopard and Mail 4.1, and it does not work on my G5 computer running Leopard (10.5.8) and Mail.app 3.6?

====== code begins


using terms from application "Mail"
on perform mail action with messages these_messages for rule this_rule
set sourceFile to "MacBookAir HD:Users:bernardo:Desktop:forward.eml"
set sender_address to "email@hidden"
set recipient_address to "email@hidden"
repeat with thisMessage in these_messages
tell application "Mail"
set thisSource to the source of thisMessage as string
set _subject to subject of thisMessage as string
set _file to open for access sourceFile with write permission
set eof of _file to 0
write thisSource to _file
close access _file
say "sending an email I received with subject " & _subject
set newMessage to make new outgoing message with properties {visible:true, sender:sender_address, content:"You have this new fax..."}
tell newMessage
set subject to thisMessage's subject
make new to recipient with properties {address:recipient_address}
tell content to make new attachment with properties {file name:sourceFile as alias} at after the last paragraph
end tell


set visible of newMessage to true
send newMessage
set found to outgoing messages
say (count of found)
end tell
end repeat


end perform mail action with messages
end using terms from

====== code ends

Thanks!


Bernardo
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: AS Bug
  • Next by Date: Ascii number of return
  • Previous by thread: Re: AS Bug
  • Next by thread: Ascii number of return
  • Index(es):
    • Date
    • Thread