How to send PDF attachments in email using Reactive Web, I have already used Ultimate PDF I can download it in PDF form, But I am not able to send it in email.
Thanks and regards
Ashutosh Soni
Hello,
In ultimate PDF you have a server action (ScreenToPdf) to download the PDF in server side.
To send the attach you Should create a tradicional app. As far as I know it's not possible in react.
Regards
At this point you must create a Tradicional Web Application and expose the email in a public action.
Consume the action on your React application. Pay attention to security issues like parameters, etc...
@Ashutosh think of splitting your problem into two parts.
Ultimate PDF is really a great component that help you all the way till you generate your PDF file. Everything upto here can be done in your Reactive app.
After that the remaining part has to be done in Traditional Web app which actually sends an email. You expose a public server action which receives the PDF and sends as an email attachment.
Your reactive app will call the public server action for sending the email. Here's how you connect both bits together.
I myself find that exposing a public action to send an email via a traditional app an architecture constraint. You are letting a core component (the backend) communicate with a front-end facing application (emails are just like screens and there for front-end in my opinion). This is an upward reference that should not be allowed.
My solution for this is using BPT Light. I have an SendEmail entity with all data needed to sent an email, including the PDF. This SendEmail entity has its event exposed (advanced setting). The Email application has a process that will trigger on the creation of records in this SendEmail entity. It will then execute all needed actions to send (and only send) the email. When this email has been sent the SendEmail record can be removed.
I use sometimes but for main cases is to use a rocket to solve small problem.
You can define tradicional module as foundation.
The fact that you can change the classification doesn't mean that it is architecturally correct. And for now, I think it is not.
And it is not a rocket. It's a very elegant method to trigger actions that take an unpredictable amount of time, like sending an email is. Best to do this async so no-one is affected by this.
When a new Record or update on certain table means send e-mail, I fully agree with you.
It's what I'm doing um some projects.
Simple e-mails I use react.
It's a dedicated entity for just triggering an email. That is what I always use and it works very good. Entity contains all relevant information like From, To, CC, Subject, Body, Attachment(s) and more. Add an EmailType static to make sure the correct email is sent and that's all you need.
Sounds good, it's a good idea 😁 You have my like 💪🏼
Hi Paulo,
Do you have any OML file for BPT logic ?
Ashutosh
I'll try to make you one Ashutosh. I am very busy at the moment so if you have not received it by wednesday then please ping me.
I can prepare a simple demo for you on weekend.