Does anybody know how to send a bunch of personalized emails that have formatted text and some hyperlinks. I’ve got the part down about personalizing them, but how do you use AppleScript to create email text with links and formatting? I have been using Eudora as the email client in this exercise, but I could use Netscape or Outlook if one of them would be better.
My first problem is with formatting. I find that I can manually copy bold formatted text from FileMaker or Word and paste it into a Eudora email message retaining the bold formatting. However, when I try that with AppleScript, using a styled text variable, the formatting is lost. Likewise, if I have AppleScript copy the formatted text to the clipboard and then paste it into a Eudora message the formatting is lost.
I know that there is underlying html formatting used in a formatted email messages and that, if I knew how, I could write that code and paste it in using AppleScript, but how can I get access to that code level of the message?
Obviously, if I knew how to write the html code for the message, my second problem, how to include hyperlinks in the message, would be solved at the same time.
If you can use Outlook, you can take a look to this freeware:
The stuff is no longer supported but, as long as I remember, it may work good…
I could suggest lots of solutions for OSX, but I can’t remember more for pre-X, unless we talk about $$
You can program until you are blue in the face, if the end user doesn’t have their email client configured to view as HTML, or display clickable hyperlinks they just won’t see them. If you know your users have these capabilities enabled then I may have some ideas for you.
To send complex HTML via email (think web page), take a look at one of my previous posts regarding the usage of Outlook Express. It is as simple as reading an HTML file, using it as the body content of the message, and turning on the message property “HAS HTML”:
If you’re not up to writing HTML to format your email you can still just include clickable hyperlinks. If you aren’t picky with how they look, I would think any hyperlink starting with “http://” would make the text clickable in most email clients.
I used to script Eudora quite a bit when I first started and remember that I used to use signatures to send formatted emails. Create a signature and name it. Then use that when you send your message, (you can format the text in your signatures any which way, then dynamically change any text in your signature for each email). The code for applying a signature to a message in Eudora is:
tell application "Eudora"
set newMsg to make new message at end of mailbox "Out" --compose a new message
set field "subject" of newMsg to "subject text here"
set field "" of newMsg to "" --field "" of a Eudora is the Body Copy
set field "to" of newMsg to "firstname.lastname@example.org"
set priority of newMsg to 1
set signature of newMsg to "some signature name"
Hope this helps in some way. If you are looking for something more specific let us know.