No announcement yet.

Problem attaching PDFs on email

  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem attaching PDFs on email

    For you more experienced users, where should I created my PDFs to be attached to emails?

    I'm creating PDFs using jasperstarter, but when I use the same fully qualified Windows path (development) filename as the email attachment, I get the following error. I've confirmed the PDF is created and filename is correct.

    My code is being run from a project library I've created.

    I've tried creating the PDFs in the following folders with the same error:
    C:/Program Files (x86)/NetMake/v8/wwwroot/scriptcase/app/CICProctor/temp/proctor-application-emilner-2015-06-14-2022.pdf

    I've set permissions on folder to : Everyone: read,write,list

    Fatal error: Uncaught exception 'Swift_IoException' with message 'Unable to open file for reading [C:/Program Files (x86)/NetMake/v8/wwwroot/scriptcase/app/CICProctor/temp/proctor-application-emilner-2015-06-14-2022.pdf]' in C:\Program Files (x86)\NetMake\v8\wwwroot\scriptcase\prod\third\swi ft\classes\Swift\ByteStream\FileByteStream.php:136 Stack trace: #0 C:\Program Files (x86)\NetMake\v8\wwwroot\scriptcase\prod\third\swi ft\classes\Swift\ByteStream\FileByteStream.php(80) : Swift_ByteStream_FileByteStream->_getReadHandle() #1 C:\Program Files (x86)\NetMake\v8\wwwroot\scriptcase\prod\third\swi ft\classes\Swift\Mime\ContentEncoder\Base64Content Encoder.php(41): Swift_ByteStream_FileByteStream->read(8190) #2 C:\Program Files (x86)\NetMake\v8\wwwroot\scriptcase\prod\third\swi ft\classes\Swift\Mime\SimpleMimeEntity.php(526): Swift_Mime_ContentEncoder_Base64ContentEncoder->encodeByteStream(Object(Swift_ByteStream_FileByte Stream), Object(Swift_Transport_StreamBuffer), 0, 78) #3 C:\Program Files (x86)\NetMake\v8\wwwroot\scriptc in C:\Program Files (x86)\NetMake\v8\wwwroot\scriptcase\prod\third\swi ft\classes\Swift\Transport\StreamBuffer.php on line 177

    Last edited by emilner; 06-14-2015, 10:19 PM.

  • #2
    The problem was caused because I was using forward slashes "/" instead of back-slashes "\" in the attachment filename.