I can't figure out how to add an attachment to an email. The file needs to be attached without the user needing to select the file. I've attached an oml file for my test app. I use the EmailComposerPlugin successfully to create the email and present the native UI for sending email. The email actually sends successfully. The "OpenEmail" client action in the plugin includes a field for "Attachments". This is where I hit the road block. I can not find any documentation that describes how to determine the correct url to use. I've tried everything I can think of... no luck.
This is being built as a native ios app. The file I need to attach is called "stateAbbrevs.xlsx". I used this file to import entities into the apps database. For all I know the actual excel file may not even be accessible by the app at runtime. It was used to import entities but the file itself may not be part of the final app. If that's the case, there must be a way to include a file in the app - may be not. If not, how can this be done? Surely I can't be the first to one to have a need to this.
It would be very happy if someone would download the attached oml and modify it so the file gets attached. In case that's simply not possible (adding a file to the app so it can be used and attachment), I've put two files on my personal website. tpmeehan.com/attachme.pdf. tpmeehan.com/attachme.xlxs
As an alternate solution, if there's a way to download or somehow have access to either of these files so it can be attached to the email that would be very helpful as well.
This problem has stopped me in my tracks for a few weeks now. It's driving me nuts.
Thanks in advance for any help.
Hi Tom,
I'm not sure that I understood correctly or not, however I updated your .oml file.
There are 2 changes:
1. Update Deploy Action to Target Directory.
2. Then you can use the Resource's URL now:
Hope this helps,
Khuong
Wow... thanks for your quick response. Ironically this was the first thing I tried a couple of weeks ago. Specifically setting the path to Resources.stateAbbrevs_xlsx.URL. I didn't know about the "Deploy Action to Target Directory" business though.
However, the app crashes with these changes. That's what it was doing when i first started in on this weeks ago. The sad thing is I can't find the crash. The exception handler doesn't get called. I don't see any details with stepping through with the debugger and there are no crash reports on the ios device (although that sometimes takes hours to get registered on the device).
Things are looking up but I need to figure out what is causing the crash.
Does this crash for you?
I haven't installed the plugin so sorry I cannot test it. My suggestion above is to get Resource URL for attachment.
Alternative, my suggestion is that you can give a try on the built-in Emails https://www.outsystems.com/forums/discussion/70800/technical-preview-built-in-emails-for-mobile-and-reactive-web-apps/. The built-in sending email now ready for mobile and reactive web apps.
You can follow this for adding attachments: https://success.outsystems.com/Documentation/11/Developing_an_Application/Implement_Application_Logic/Technical_Preview_-_Emails_in_Mobile_and_Reactive_Web_Apps/Adding_email_attachments.
Cheers,
Hi again,
I updated to use built-in Emails already. You can take a look and test it if needed.
Thanks for the help with this. Looks like i'm getting close but now I'm in another cloud of uncertainty. I get the message "Unavailable Feature'Built-in emails for Mobile and Reactive Web apps' is not enabled in your environment. To publish you need to enable it.". Seems like it should be a piece of cake to enable this feature but I can't seem to find where and how that is done. What can you tell me?
Hi,
You need to enable the built-in Emails you can follow this https://success.outsystems.com/Support/Enterprise_Customers/Upgrading/Technical_Preview_features
Make sure enable these 2 options:
Hi Tom Meehan
You can use outsystems default mail for sending mail with attachment by following steps.
1)store the attachment in entity(create new or in existing)
2)In outsystems default mail action create mail with content you want
3)In the preparation of mail screen(template) you can retervive the file from entity and use add AttachFile it ask for attachment in which you can give the Binary data file(Attachment) from the data.
Hope this helps you
Best Regards
Prathoswar S
Thanks for the help with this. Your solution looks promising. However, I get the message "Unavailable Feature'Built-in emails for Mobile and Reactive Web apps' is not enabled in your environment. To publish you need to enable it.". How do I enable this. I don't see that specific item in environment configuration.
The mail was supported only in latest version of outsystems for reactive and mobile. If its old version, the mail was supported only in traditional web.
If no built in mail found for your environment for reactive/mobile, then you have to create traditional application and write all the mail logic there and call the server action in your reactive/mobile application through dependency.
Also please check if your service studio met these prerequisites for reactive/mobile app through this link.
Prerequisites