No announcement yet.

send exported document by email?

  • Filter
  • Time
  • Show
Clear All
new posts

  • send exported document by email?

    hi guys, i want to send xml, txt, doc p df or any other exported file from FORM directly by email as attachment

    anybody did that and what is the easier way that tcpdf thing? i tried but couldn't success

    any easy tutorial or special instructions for this?

  • #2
    Sending any file goes the easiest with PHPMailer if you want to send several pictures and so on. You need to fiddle less in details with it. sc-mail_send is also fine but you can send only one attachement afaik. for a simple example...


    • #3
      oh rr dear friend, i know about phpmailer but don't know how to use it along with SC, i am not an expert like you guys

      also wanted to export some report or grid like the one when you click on PDF export for example then send directly by email to some address that user fills in...

      i still wounder what will be the main hint to use the exporting the sc file or and how to make it possible

      also still reading in the forums but couldn't success actually


      • #4
        I do this with Swiftmailer !


        • #5
          Well, there is no easy way. The problem is that you can't catch the exported file with the tools provided and save it on the server.
          There is no way from within SC to intercept the generated file other than download it and then upload it.
          You have to create those files by yourself.
          It is certainly somewhat easier for a grid (there are plenty of classes available) then for a form especially when it comes to iframes.
          I think the easiest way would be a feature request to Netmake. :-) :-) But that could take some time.



          • #6
            hello jsb, again glad to read your name and thanks for your time, I understand your point and one thing about "take some time" with netmake is perhaps ages :-P

            however, this feature is not really urgent or necessary to make it now and all in one click, as you said, can be downloaded and sent, but the feature itself, will be valuable if added by netmake or even easy way to do it...

            for me, I still scare when comes to "classes" don't know how to use php stuff that available online along with SC, but will keep trying to understand the fundamentals at least

            once more, looking at myself like one year back till now, jsb, your respectful personality and posts/replies (either to me or in the forums when answering others) is one of the things that encouraged me to go through all the difficult stuff during the last months, I never thought I could reach this far in specific functionalities and certain directions

            thank you jsb, to Albert, rr, kafe, adz, EricB, Giu, and many other, about a year back I was lost with SC and PHP codes and how to use them, well, I am still lost somehow, but not like that time

            thanks guys


            • #7
              Hi Mike, did you ever figure this one out ?


              • #8
                Originally posted by leonvz View Post
                Hi Mike, did you ever figure this one out ?
                Yes, do you want to send an attachment in an email message? or something else?


                • #9
                  I think it could be possible:
                  01. On scriptinit of the grid write this line: SC_set_PDF_name='your filename.pdf';
                  That means you know the file name and location "../_lib/file/tmp/you filename.PDF"
                  02. Now add a button with SC mail send macro by attaching the file. (Still user has to click two buttons one for exporting PDF and other to send mail, if there is any way to call export PDF button programmatically then one button can do the same).
                  S. M. Rajibul Huda
                  CEO & Founder


                  • #10
                    Originally posted by rajibul View Post
                    I if there is any way to call export PDF button programmatically
                    That's what I'm looking for months without success


                    • #11
                      Originally posted by Joe View Post

                      That's what I'm looking for months without success
                      why don't you make the button available only after clicking the first one... or add a code to execute the what other button does after onValidate success or something.. sorry didn't try to produce PDF file and send it, my expereince was sending simple attachment field file by email, and it worked later...


                      • #12
                        I found no way to execute the code as the pdf button does.... and this button has no events
                        Sorry if I hijack the thread


                        • #13
                          I'm looking for the same thing Joe, programmatically invoking the export functionality


                          • #14
                            i wounder guys why you can't track the button function... can't you use some sort of tracking what the button does and add it to the code? i would like to try it myself just don't have the prerequesit or the full scenario nor the time to go through it, if you have a project you can export with mysql dump you can share lets have a look


                            • #15
                              Hi Mike, I don't know what the pdf button exactly does. If you copy the link you get this
                              The browser shows this link
                              javascript: nm_gp_move('pdf', '0', 'cor')
                              I was experimenting with that without any success. I just would need a custom button which executes this code and some other php stuff. After that the email things with pdf as attachment would be easy.
                              For testing Mike you could use the SC own samples -> Grid Applications -> Grig19 customers report for example