We routinely send email attachments, but only one at a time. We use PDFs. This
code is a button on
a form we call, funnily enough, EMail. We also call this form as part of
another button that
prints a report as a PDF and passes the attachment name, subject, etc. to the
EMail form, which
allows the users to select the addressee and make or add to comments. All the
f* variables are
fields on the form. Opening the form with the variables predefined is the usual
treatment. Our
database uses double quotes, * for many wildcard, ? for single wildcard.
--------------------------------
SET VAR vrMail TEXT
SET VAR fReturn TEXT = (CHAR(013))
SET VAR fFrom TEXT = (SRPL(.fFrom, "To:", "From:", 1))
SET VAR fSubj = ("Subject:" & .fSubj)
SET VAR fCC = (IFNULL(.fCC, "CC:", ("CC:" & .fCC)))
SET VAR fBCC = (IFNULL(.fBCC, "BCC:", ("BCC:" & .fCC)))
SET VAR fAttach = (IFNULL(.fAttach," ",("X-Attachemnts:" & .fAttach)))
SET EOFCHAR OFF
OUTPUT C:\EMail.mal
WRITE .fTo
WRITE .fFrom
WRITE .fSubj
WRITE .fCC
WRITE .fBCC
WRITE .fAttach
WRITE "Format:T"
WRITE .freturn
WRITE .freturn
WRITE .fbody
OUTPUT SCREEN
SET VAR vrmail = (UDF("@RMail.DLL","C:\EMail.mal"))
IF vrMail = "N" THEN
PAUSE 1 USING "ERROR - Mail Not Sent! Check your entries"
PROPERTY TO SET_FOCUS "True"
ELSE
CLOSEWINDOW
ENDIF
RETURN
--------------------------------------------------------
--- Ben Fogt <[EMAIL PROTECTED]> wrote:
> It seems that the other process I wrote that was working last week failed
> last night in the same way. Does anyone have much experience with R:Mail
> attachments?
>
> Ben
=====
Albert Berry
Management Consultant
RR2 - 1252 Ponderosa Drive
Sparwood BC, V0B 2G2
Canada
(250) 425-5806
(250) 425-7259
(708) 575-3952 (fax)
[EMAIL PROTECTED]