Sending email with attachment

Hi,

I’m facing some troubles whith the “send email node”.
My needs are: send an email with an attachment (pdf file). The workflow is running in local, but not in the KNIME server.
Workflow not able to find the file. I save it in the server, but not able to configure the link URL in the node.

Any idea?

Thanks

Paolo

Hi @Paolino1980,

first configure the send email node locally and add the attachment (with local filepath)
Then a new option will appear in the flow variable tab.
Override the attachment file 1 with a flow variable linking to the correct server path

As an alternative - you could try to put your upload pdf file in the workflow folder. Then you can use a relative knime path in the attachment path. This should work with the same path locally and on the server :slight_smile:

Hi @AnotherFraudUser ,

it is not working. when I used relative knime path in the attachment path, it is showing the following error:
ERROR Send Email 0:13 Execute failed: C:\Users\CAN4OFO\knime-workspace\Users\can4ofo\Report%20prenotazione%20sacchetti%20mensa.pdf (The system cannot find the path specified)

What I’m doing wrongly?

Hi @Paolino1980 ,

attached an example workflow which works for me.
example mail server.knwf (14.8 KB)

Upper example tries to automatically switch between server and local path.
While in the lower you can just enter your Server path

3 Likes

Hi @Paolino1980 -

Still having trouble, or has @AnotherFraudUser 's workflow led you to a possible solution? If needed, you can send an example workflow and screenshots to support@knime.com if there’s sensitive information you don’t feel comfortable posting on the forum.

1 Like

Hi @ScottF,

yes, I have still trouble. The workflow doesn’t work in the knime server. I’m sending you the workflow I did after hints of @AnotherFraudUser .

<<<<<<<<<<-Attachment removed ->>>>>>>>>>>>>>>>>>>>>>>>>>

Thanks

Paolo

Hi @Paolino1980,

you should hide your server and user information from the workflow.
Sorry I could not help :frowning:
As far as I can see it should work as long as the address is correct.
I am somwhat confused by the server link - I would expect the link to start with / and not with // if it is a unix server.

Hi @Paolino1980 -

It looks like the string you are creating in your String Input node is malformed for what you’re trying to do. Yours looks something like this (obfuscated for security reasons):

\\domain.com\dir1\dir2\MyReport.pdf

That .com in there looks a little strange. You want to make sure that this URL points to an actual file that the server can locate in its own directory structure.

You may want to check this forum post and the associated workflow on KNIME Hub for an example of how to use the Send Email node. Note that this example still uses local file paths (e.g. file:/C:/myfile.txt) so you stilll will need to come up with a URL that works for your server.

1 Like

Hi @Paolino1980 -

Did the above help, or are you still running into problems?

1 Like

Hello @ScottF ,

yes. now it is running.
Thanks

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.