You need to sign in to do that
Don't have an account?
Oz
Sending emails and S-Controls
The application that I am creating needs to send an email out upon completion of a process. The process happens in a S-Control that updates a Custom Object.
Is there a way of sending emails through an S-Control? I have been hearing of an emailauthor.jsp but have not been able to find info on it.
Thanks.
-Oz
Is there a way of sending emails through an S-Control? I have been hearing of an emailauthor.jsp but have not been able to find info on it.
Thanks.
-Oz
I really depends on what you scontrol is made of! If you are using an embedded jsp/asp, activex or applet, then you should be able to do email without much trouble. If you are using the AJAX toolkit (javascript) then you will have some difficulty. You can as you mention use the emailauther.jsp, but this is unsupported and subject to change without notice.
/email/author/emailauthor.jsp?retURL=%2F003D000000Bxtvg&rtype=003&p2_lkid=003D000000Bxtvg&p6=Some+subject&p7=This+is+the+body+of+the+email
The url above, when used from an scontrol by setting window.parent.document.location.href, will cause the email screen to be shown with the subject - p6 and the body - p7 filled in. The p2_lkid is the id of the contact, in this case, to send the email to, the rtype is the prefix for a contact (enables the search link I think) and retUrl is the url back to the contact detail page.
Not sure how you would do attachments.
Oz and DevAngel,
I just spent some time "reverse engineering" the whole emailauthor.jsp thing, for a similar purpose. Building on what DevAngel has already provided, I was able to invoke a previously stored email template, which fills in the subject, body and attachment(s). My URL looks something like this:
window.parent.location = "/email/author/emailauthor.jsp?retURL=%2F{!Key_ID}&p3_lkid={!Key_ID}&p2_lkid={!Key_Contact_ID}&new_template=1&nosave=0&template_id=" + templateArray[templateIndex];
{!Key_ID} is the record ID of a custom object; {!Key_Contact_ID} is a related contact ID; and templateArray[] is an array of template record IDs (my code can pass different template IDs depending on other conditions in the code).
I do understand that use of emailauthor.jsp is currently unsupported and subject to change, but I couldn't find any other way to do this. It's my understanding that even with workflow rules on custom objects (which we're supposed to be getting within the next couple weeks) we can only send emails to SFDC users, not to account contacts.
Thanks,
- Mike
Mike,
I am trying to send a workflow alert to a contact instead of a user. Is that possible with an s-control?
Josh
I've been scouring the net for the answer to that question and I can't find anything.
-=Bryan
Also by default the owner comes as bcc when u try emailing using emailauthor.jsp