In the sendMail method, the inMailFile parameter has two behaviors,
if "!" (a bang or exclamation mark) is the first character, the text
passed in inMailFile is executed using the A4D Execute command. If
the first character is not a "!", inMailFile is considered a path to
a text file which is executed by a include into command inside the
sendMail method. However, since it is inside a method call, you don't
have access to local variables or local collections (like $fusebox or
$attributes), so you can't use existing fusebox centric files.
If you use include into before calling sendMail to create the email
body, there is no way to pass that result to sendMail cleanly, if you
pass it with a preceding bang, A4D will try to execute it (and fail
most likely), and without it, it's not a path so that fails.
My proposal is to add an additional parameter character to inMailFile.
At line 502 0f a4d.utils.a4l, change
if ($inMailFileOrText[[1]] = "!")
save output($message)
execute(substring($inMailFileOrText;2))
end save output
else
include into($inMailFileOrText; $message)
end if
to
case of
:($inMailFileOrText[[1]] = "!")
save output($message)
execute(substring($inMailFileOrText;2))
end save output
:($inMailFileOrText[[1]] = "|")
$message:=substring($inMailFileOrText;2)
else
include into($inMailFileOrText; $message)
end case
This creates the additional parameter character option "|" (the pipe
character). If the first character of inMailFile is a pipe, the text
of inMailFile (stripped of the pipe itself) is passed without execution.
This allows you to execute fusebox centric files to generate the
email body and still use the sendMail method.
--
Bart Alcorn
National Service Center
800-500-6421 x 2360
AIM/iChat: balcornnsc
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/