(no subject)
(no subject)
- Subject: (no subject)
- From: Tim Barlow <b&email@hidden>
- Date: Sat, 14 Jul 2001 17:54:18 +1000
Hi Everyone,
I'm redeveloping/rewriting my Mac application 'eLetter' with a more
up-to-date interface and features. The application is a 'personal' bulk
mailer that allows the merging of information from a Filemaker Pro
database with a template letter. One of the new features is its ability
to output html text and embedded graphics. That is, the letter that is
generated by merging data from a FileMaker Pro database and the template
letter may contain one or more pictures and the text may be output as
either plain text or html. The generated letter is passed on to an
AppleScript that then uses the data to generate an outgoing Eudora email
(and by changing the AppleScript other scriptable email clients may be
used).
Template Letter -> | <- FileMaker Pro Database |
AppleScript Script
| |
Eudora
What I would like, is for the AppleScript to generate an outgoing email
with embedded in-line pictures. I've tried everything but to no avail.
The problem essentially is split into two sub-problems. The first is ...
... the only way that I can get Eudora 5 to accept/process HTML in the
body of the email is in the following fashion -
on doscript(emTo, emCc, emBcc, emSubj, emBody, emGraphics, emHTML,
emSendNow)
set msg to "To: " & emTo & returnset msg to msg & "Cc: " & emCc & returnset
msg to msg & "Bcc: " & emBcc & returnset msg to msg & "Subject:" & emSubj
& return & returnset msg to msg & emBody
set newEmail to make new message at end of mailbox "Trash" with data msg
set newOutEmail to send again newEmailattach to newOutEmail documents
emGraphicsqueue newOutEmail
... which is a somewhat round-about way of doing it. I do it this way
since the more conventional method of ...
set newEmail to make new message at end of mailbox "Out"set field "To" of
newEmail to emToset field "" of newEmail to emBody
... doesn't seem to recognise/process the html code in 'emBody'
QUESTION, is there another, better way of doing this?
The second problem is how to display my pictures in-line. What I'm doing
at present is extracting the pictures, creating jpeg files and attaching
these to the email, I then refer to them from the html body of the email
via <IMG SRC= > tags. For example ...
<IMG SRC="2866.JPG" ALT="2866.JPG">
... these are some of the variations I have tried ...
<IMG SRC="2866.JPG" ALT="2866.JPG"><IMG SRC="FILE:2866.JPG"
ALT="2866.JPG"><IMG SRC="
CID:2866.JPG" ALT="2866.JPG">
... I don't know if the problem is that I attach the pictures to the
email AFTER I set the body to the HTML text and not before. However I
simply cannot figure out how to attach the picture file(s) before I set
the html body.
So the QUESTION is, is it possible to achieve this and if so, how?
Thanks in advance for any help given.
--
G.P.O. Box 263 email :
mailto:email@hiddenngston
:
mailto:b&email@hiddensmania web :
http://www.kagi.com/b&bsoftwareAustralia
7051. :
http://www.trump.net.au/~bbsoft/
ph/fax: +61 (03) 62 921162