[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: Automated mail packaging script?



 _____________________________________
 } In reply to Vicki Brown's message of 19/3/97
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|: Does anyone have or know of a script that will do the following (on a Mac,
|: using Eudora for Email):
|: 
|: for all files in directory / folder
|: 
|:     package the file into a MIME message and send to X address
|: 
|:     move file into a "sent" mail folder

Sorry - I gave you AppleScript, not realizing until the message was flying out the door that you had sent it to the Frontier list as well as the Eudora-Mac List.  So here's the Frontier equivalent.


local {
	myRecipient = "noone@nowhere";
	myLocation = file.getsystemdisk();
	myFolder = myLocation + "Text Files for Mail:";
	sentMailFolder = myLocation + "Sent Mail:"};
fileloop(f in myFolder) {
	local (messageText = toys.readwholefile(f));
	with objectmodel, eudora {
		local (nextMessage = make(message, endof(Mailbox["out"])));
		set (nextMessage.field["to"], myRecipient);
		set (nextMessage.field["subject"], "no subject");
		set (nextMessage.field[""], string(messageText));
		queue(nextMessage)};
	file.move(f, sentMailFolder)}

                             John
                           ~{9y=-~}
                             ³¢¦¿