Can someone share a complete PHP example how to send an encrypted email?

  • 1
  • Question
  • Updated 5 months ago
Although an admitted newbie to ShareFile, I'm not inexperienced with PHP. I'm trying to send an encrypted email to a client using PHP through the API. I see this a multi-step process and I have set up some code that creates the encrypted email ID; uploads the file with my message; and finally sends the encrypted email using the created email ID.

However, when I try to open the message in the client account, ShareFile just sits there with the indication showing decryption underway. I suspect the file is not being transmitted between uploading and the sending steps. I see that step 2, upload, returns a ChunkURI containing the encrypted file information, but the documentation is not really clear on where I should use this. According to the documentation, the send encrypted email step only seems to require the ID returned in the first step.

Elsewhere in the documentation, the command line curl examples show how the ChunkURI is used while uploading a file (2 step process). Is someone out there willing to share a complete PHP send encrypted email example?
Photo of Robert Clark

Robert Clark

  • 2 Posts
  • 0 Reply Likes

Posted 6 months ago

  • 1
Photo of Robert Clark

Robert Clark

  • 3 Posts
  • 0 Reply Likes
I want to withdraw this question from the forum. I found that you must append a field to the returned ChunkURI to obtain the needed information from the posting step. The documentation does not include that. Text files do upload to the ShareFile mail recipient, however, no formatting (e.g., paragraphing, line spacing, logos, etc.) is displayed when the recipient opens the message. This applies to plain text, PDF, Microsoft Word files, and HTML file types.

If any of you have an insight on how to correct this issue, I would be grateful if you are willing to share it. Otherwise, using PHP on the API to send encrypted emails is very limited.