i have an send smtp mail activity, where i am attaching a image via attachment component of the activity to a Html mail Body.
If i am running the code from the Studio i am getting the image, But if i publish the same code to the Orchestrator and Running it from the orchestrator then it is not attaching the image to the mail.
If you publish it and run it in Orchestrator, the robot’s destination will change. If there is an attachment in the location where the .xaml file is located, the path after publishing and the previous path will change, so please check it again.
Hey Hi @kimjinseong i went to the path that you said, But i could’nt find my process over there
may be because Mine a Organization License Orchestrator(Dev Orchestrator).
When running the code from UiPath Studio, the image attachment may work because the image file is located in the same folder as the project files. However, when running the code from Orchestrator, the process is executed on the robot’s machine, and the relative paths might be different or inaccessible.
To resolve this issue, you can try the following approaches:-
Try using a relative path for the image file, provide the complete absolute file path. You can use the Path.Combine method to construct the absolute path dynamically, based on the known location of the image file.
Include the image file as an Asset: Upload the image file as an asset in Orchestrator. Then, in your workflow, use the Get Asset activity to retrieve the image file’s path and provide it as the attachment file path in the Send SMTP Mail activity.
Publish the image file to a shared location: If possible, store the image file in a shared location that is accessible to both Studio and the Orchestrator. Update your workflow to use the shared path when attaching the image file.