Allan, I have found the best way to handle emails is by storing all parts in a
record, and then building the email from the record's parts during the “send”.
I store the attached docs in an object field.
This allows a single email dispatcher method that simply processes the
“outgoing - waiting for send" records in order.
A single email sender method avoids clashes with IC calls from different
methods at the same time (was a problem at one time - may no longer be).
Among other things, using records also allows
- a history of sent emails
- by who, when, from where, category, source, etc
- to be archived or discarded at x months old
- a history of failed “send” attempts and what the error was
- automatic retry of failed send after x seconds
- resend
- to actual recipient
- to test address
and all other email audit actions.
But it may mean a partial rewrite of your core code…
Cheers, Keith
There are 3 kinds of mathematician. Those who can count, and those who can't.
> …
> It seems to me that when building up an email using the new Mail theme
> commands in 4D v17R6/v18, if an attachment is added to the mail object,
> when that email object is sent to a new process using either the 'New
> process' or 'Execute on server' commands, the attachment Property in the
> email object is now empty and the email will NOT send due to this error
> condition….
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************