How to show "New Message" modal of Mail app from another custom app?

Hi,
I am new to nextcloud development. I am building a custom app where I want to send email from my custom app using Mail app’s “New Message” modal from a vue component.
Is there any way to access that?

Wow man, that is a hard thing to do the way you describe it. I would say no, not possible to remote control one Vue app on the browser using another with crazy stuff going on…

But: I am not sure I get your use case.

If you want to plainly send an email, you could use the server and its configured mail credentials. If you need access to foreign Mail accounts using SMTP, you could implement it in your backend or maybe just call appropriate rest API calls from the mail app (speak with the authors)?

Or do you want the user to write an email and you just provide some sort of draft prefilled? Then you might to interact with the actual Vue frontend in some way. The authors might have an idea on how to do this.

But first, depending on your use case, this might be a stony way.

Christian

Thanks for the replay Christian.

I will try to explain in short.

I have a rejection button, which will open the Mail compose modal. From there the currently logged in user will be able to send mail to the rejected user’s email.
This is why I was thinking of using the Mail app “New Message” button.
I was kinda hoping for a feature like OCA.comments that can be extended to vue.js.

And I am using nextcloud v25.0.9

Mehedi

So, I try to summarize what I understand so far:

You want the user to receive some requests that can be rejected (or obviously committed). In case of rejection the rejected person should get a timely message informing about the rejection. In order to make it as polite as possible, the user can add some words of his own to explain the reasoning out whatever.

You want to reuse the same mail credentials as the normal mail app in order to send out the mail in the name of the user.

It’s this all correct?

Honestly, I have not found a quick hint on the OCA.comments entry you mentioned. Do you mean via WebDAV using the browser?