OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Is there any posibility to send attachments with email in email activity in workflow ?

Open MuhammadTalha10 opened this issue 5 years ago • 15 comments

MuhammadTalha10 avatar Dec 23 '19 10:12 MuhammadTalha10

I have a job form and it contain candidate CV in pdf form how do I can send that pdf through email to the recipient email address? or is there any other way to do this ?

MuhammadTalha10 avatar Dec 23 '19 10:12 MuhammadTalha10

The current email abstraction APIs doesn't support sending an attachment file, but we could add this feature in the future releases

hishamco avatar Dec 23 '19 13:12 hishamco

any other solution for this ? what should you propose ?

MuhammadTalha10 avatar Dec 23 '19 13:12 MuhammadTalha10

M suggestion is to create a new implementation of ISmtpService which support sending attachments, you could have a look to the current SmtpService implementation if you do so

hishamco avatar Dec 23 '19 13:12 hishamco

First we need a task to extract files from POST requests. Then save it temporarily and then another task that could join files to emails.

sebastienros avatar Dec 26 '19 20:12 sebastienros

Hello All,

I'm running into the same issue now even two years later as I am just learning about using the workflow activities. Has there been any update on this? I mean in regards to adding the attachment feature.

Greg712144 avatar May 01 '21 03:05 Greg712144

I would also welcome this feature.

imho related to #6027 should be enough to finish save files task, add their paths to output and create input in send email task that would consume list of files and send them as attachments.

MikeKry avatar Aug 17 '22 09:08 MikeKry

I need it for my project anyway, so I created a POC for OC too. #12218

MikeKry avatar Aug 18 '22 08:08 MikeKry

We need a different issue to track adding an API in the email service to send file.

@MikeKry I believe that this PR is adding support to send files to a workflow and store them, which is a different step.

sebastienros avatar Aug 18 '22 18:08 sebastienros

@sebastienros we already support attachments in OC.Email, what API you refer to above?

hishamco avatar Aug 18 '22 18:08 hishamco

@hishamco my bad then, it's just about the workflows.

sebastienros avatar Aug 25 '22 17:08 sebastienros

Which means what @MikeKry did is the good first task, support file uploads in workflows. Next step would then be to be able to attach one of these files in an email task. Or another file that is not coming from the workflow (media).

sebastienros avatar Aug 25 '22 17:08 sebastienros

I'm still suggesting to rid-off media abstractions in OC.Email, just extract the posted file and download it temparory using OC.FileSystem APIs as @sebastienros suggested earlier

hishamco avatar Aug 25 '22 17:08 hishamco

@sebastienros @hishamco

I confirm that email API already can send attachments.

Mentioned PR handles attachment downloading to FileSystem and also handles attaching them to Email Task and sending via email.

But it should be reviewed if it is safe and if it fits OC architecture.

MikeKry avatar Aug 26 '22 08:08 MikeKry

My concern here to remove the dependency on media APIs and follow what described above

hishamco avatar Aug 26 '22 17:08 hishamco

can you assign issue to me

Abhi441 avatar Oct 21 '23 07:10 Abhi441

@Abhi441 if you want to work on this, feel free to send a PR

hishamco avatar Oct 21 '23 08:10 hishamco

can you connect for giving kt on issue and application .

Abhi441 avatar Oct 21 '23 16:10 Abhi441

I didn't understand your question?!!

hishamco avatar Oct 21 '23 16:10 hishamco