File upload + send email via custom java service

Hello,

I would like to know if there are any samples of java server code where a client could call a custom java service to upload a file and send an email? Here’s the method signature I would like to write:

public void SendEmailWithImageAttachment(String subject, String body, List recipients, File file)

I have a sense that I can’t do this, but I was interested to know if anyone had been able to do it, if it was allowed, etc?

If not, I’m guessing I have to have the client call the Backendless.shared.file.uploadFile() method, then follow it up with a call to my already existing SendEmail() custom api.

Thanks for any suggestions!

Mark

Hi @Mark_Moline!

Unfortunatelly there are no code examples for this case.
For sending email with file attachment you should load file in Backendless File Service first. After that you will be able to send it with email using Backendless Messaging.

You can check link to documentation for more information about signatures of methods for sending emails in Java SDK
https://backendless.com/docs/android/pubsub_sending_email_rest.html

Regards, Andriy