function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Email from Trigger

First, is it possible to send an email from a trigger? If so, is there an example or documentation somewhere.

Further, is it possible, in general, to access the Apex Web Services API from within a trigger? Maybe I'm just getting my terminology all mixed up, but I'm losing a little of the separation between the Web Services API and the Apex methods to which my trigger has access.
Right now you can't send mail directly from apex code. You may be able in the future. However, you could use a trigger to update a field on a record that would then trigger a workflow rule which could send an email.
As for the API, you don't have access the webservices API from within Apex code. However, Apex code provides most of the same functions as the webservices API when it comes to data manaipulation.
Hope this helps..
The release plans for Winter '08 have support  for email in apex code.
Thanks for the good news Benji. I thought I remembered that coming up during Dreamforce.