Coming soon: Your brand new Help Center & Community! Get a sneak-peek here
I want to send an email from a SuperOffice app using the default mail application, as if you create an email and using the webtools.
As an extra i want to add an attachment to the email.
How can i do this?
Access to the email agent is restricted in the online environment and not available. Integrations must come up with their own means to send emails.
Thank's for the reply.That explains why i can't seem to find anything about it.
It's probably just me who isn't smart enough, but why do you say we can't do that? In Infobridge Panels, it works just fine, and I see that right clicking a document gives me 'Send as e-mail' functionality, whereafter the document is attached my default email client through Webtools:
I assume we can do the same as Infobridge, right?
Hi Søren (and Michael),
Ah, now see... that's something interesting that we haven't had much time to highlight and share information about. That specific functionality comes through our crossmessaging capability.
Applications hosted in applications can only directly interact with SuperOffice via the browsers PostMessage API. We have a sample script on github called CrossMessaging that demonstrates how to invoke certain behaviors. Those behaviors are:
The "Send as email" function is make possible via #4, Invoking an ajax method.
So where are these ajax methods anyway? Well, unfortunately there is no official documentation that consolidates all of the available methods. They are mainly discoverable by inspecting the browsers console output.
The only methods you can exploit are the ones that look like this:
Then select the line in the Network feed and on the right view the Request Payload (very bottom) to figure out what parameters the method accepts.
For example, to attach multiple documents to the Send As Email context menu command, the parameter is a semi-colon delimited string:
I hope this helps!
Thanks for the reply, and i am exited that you could guide me to do this.
The code snippet works just fine, and we are now able to send emails the way i was looking for.
Is it any way possible to add recipient(s) using this method?
As i can't seem to find any documentation i have to ask.
No. The documentation for that method only accepts one document id, or a delimited string of document ids. You must manually enter new email addresses in the dialog that appears.
Thanks for the reply, and the link to the documentation.
While it is true that the EMailAgent is restricted in Online environments, I'm not sure about the premise that integrations must come up with their own email solutions.The EMailAgent is not the only restricted agent, and usually it's a matter of getting restricted features approved by SuperOffice at the time of app registration.Online Restricted: This agent is not available in Online by default. Access must be requested specifically when app is registered.
While I assume it's not easy, and requires a large procedure to get access post-app-registation, it must be possible?Possible and feasible is obviously not the same thing, but if it's possible then it can at least be considered.
You can send a request with an explaination as to why your application should have access to that agent to email@example.com.
SchließenDiese Site verwendet Cookies. SuperOffice verwendet Cookies hauptsächlich dazu, um den Gebrauch der Website zu überwachen und den Inhalt zu optimieren. Bitte verwenden Sie weiterhin diese Site, wenn Sie Cookies zulassen. Mehr: Datenschutzerklärung