Eudora and from personality doesn't work.

I have a little AppleScript that pulls a message from a database, formats a message and puts it in the body of a new mail message.

I can’t get Eudora to set the “From” portion correctly though. In one case it looks right in the field, but isn’t correct when it gets sent (e.g. the field in the from portion has the right name, but it still shows “dominant” next to it and it sends from dominant). Any suggestions on setting the “From” properly?

I tried “personality” “from” and “sender” as below in the commented portion.

tell application “Eudora”
activate
make message at end of mailbox “out” of mail folder “”
set field “to” of message 0 to “”
–set personality of message 0 to “PERSONALITYNAME”
–set field “from” of message 0 to “”
–set sender of message 0 to “”

set field "subject" of message 0 to "My topic of the day, " & theDateString

set field "" of message 0 to theBody
	
--queue message 0

end tell

-“theBody” is defined elsewhere, by the way.

Oh yeah, this does this in 5.x and 6.0.x now. I thought it might be a version problem, but not for me.

Thanks!

Does this work?

tell application "Eudora"
	activate
	set nm_ to make message at end of mailbox 2 of mail folder ""
	set field "to" of nm_ to "<ace@poker.com>"
	set personality of nm_ to personality "PERSONALITYNAME" -- case counts
	set field "subject" of nm_ to "My topic of the day, " & theDateString
	set body of nm_ to theBody
	queue nm_
end tell

– Rob

Thanks for the suggestion. Now it says "AppleScript Error Eudora got an error: Can’t get personality “Yahoo”.

That is a personality - I was testing with my Yahoo account. I tried it with 4 others all with the same result so I don’t think it is operator error.

One was just two lower case letters that I copied and pasted.

All the other things (e.g. the “to” and “subject”) work fine.

:slight_smile:

Hmmm. What happens if you refer to the personality by index?

tell application "Eudora"
	activate
	set nm_ to make message at end of mailbox 2 of mail folder ""
	set field "to" of nm_ to "<ace@poker.com>"
	set personality of nm_ to personality 2
	set field "subject" of nm_ to "My topic of the day, " & theDateString
	set body of nm_ to theBody
	queue nm_
end tell

– Rob

That is odd, it gives the same error message. Tried it on an old 8600 and a G4 dual 800.

I’m don’t know what the problem might be. Both scripts work for me with Eudora 6.0.1 (paid mode) and OS X 10.2.8. Does the following snippet return the correct number of personalities.

tell application "Eudora" to count personalities
display dialog result

– Rob

Thanks for the suggestions. That returns 16 personalities. I am using 6.0.0 in paid mode. I will try 6.0.1 in a minute.

On a lack (with 6.0.0 still) I just copied and pasted your code in and it worked (with only a few changes - definiting theBody etc). I am going to re-try with the first ones and then by modifying your code and see what happens.
E.g.:
tell application “Eudora”
activate
set theBody to “msg body”
set nm_ to make message at end of mailbox 2 of mail folder “”
set field “to” of nm_ to “ace@poker.com
set personality of nm_ to personality 6
set field “subject” of nm_ to "My topic of the day, " & “theDateString”
set body of nm_ to theBody
–queue nm_
end tell

In regards to this particular script, there should be no difference between Eudora 6.0 and 6.0.1. I would be surprised if it didn’t work in v5.x as well.

– Rob

I am not sure what the problem is, but I think there must be something with that script - because yours works fine, modifying yours works fine. It is really strange. I think it is working now, I am going to keep testing (and go to 6.0.1 too).

Thanks

Good luck!

– Rob

Thanks again for the help. It was very helpful to know that a particular syntax worked for someone because that helped to eliminate it being a problem with me coding wrong.

So thanks!