Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • trfletch 598 posts 604 karma points
    Jul 01, 2009 @ 12:36
    trfletch
    0

    Email documents as attachment using Doc2form

    Hi,

    I am creating a website in Umbraco V4 and I want to have a job application form on the website, I would like applicants to be able to upload their CV which will get emailed as an attachment with the results of their form. Is this possible using Doc2form? I tried adding an upload field which seemed to let me pick a file but the file did not get attached to the email it just showed a link to the file but the link did not work. Can anyone help with this? Thank you for your time.

  • dandrayne 1138 posts 2262 karma points
    Jul 01, 2009 @ 13:03
    dandrayne
    0

    Hi there

    Are you using ajax on the form?  if so turn it off and try again - this apparently causes problems with uploads.  Validation also probably won't work.

    I've tested it on Doc2Form3 on Umb 4021 with ajax turned off and tested that it's working fine, so try that out and see how you go.

    Dan

  • trfletch 598 posts 604 karma points
    Jul 01, 2009 @ 13:15
    trfletch
    0

    Hi,

    Thank you for the quick response, ajax is turned off and there is not validation but it still doesn't seem to work. It seems that a folder is created under media for the document but no file is in the folder. I am using doc2form3 on umbraco 4.0.1

  • dandrayne 1138 posts 2262 karma points
    Jul 01, 2009 @ 14:14
    dandrayne
    0

    If you are using the latest Doc2Form for umbraco 4, ajax off and your permissions are correct then I can't see why this wouldn't work. Are you also publishing a node when the form is submitted or are you simply sending emails?  For me the link in the email was incorrect (there were spaces in the filename so the link was cut short) but the file was saved along with the node as I'd expect.

  • trfletch 598 posts 604 karma points
    Jul 01, 2009 @ 17:48
    trfletch
    0

    I am not publishing the node, I am literally just using an email form, the link was not correct for me when I selected a file that had spaces in but I selected a file that did not have spaces to resolve that issue but if I go onto the server and check the media folder I can see that the folder has been created but there is not a file within it. I assume by permissions you mean NETWORK SERVICE has full control of the media folder which it does.

  • trfletch 598 posts 604 karma points
    Jul 03, 2009 @ 11:29
    trfletch
    0

    Hi,

    Anyone got any other suggestions on this? I have now upgraded the site to 4.0.2.1 and I have even tried using the complete doc2form rather than the email one but it still does not save the document in the media folder that it creates!

     

  • dandrayne 1138 posts 2262 karma points
    Jul 03, 2009 @ 12:27
    dandrayne
    0

    There isn't much information out there on this except here, and the fact that I tested it on a clean install and a fairly simple form and found it to be working (to my surprise, actually).

    I'd try stripping your form back to the very basic, ensure that ajax="0" in the macro code, no paging is being used etc.  Try again with just a text field and upload field?  Strange one, given that I can't replicate the problem.

  • trfletch 598 posts 604 karma points
    Jul 03, 2009 @ 17:02
    trfletch
    0

    This really is a strange one, I have just tried it on another website and it doesn't work on that one either. I definately have not got AJAX enabled and it is able to create the numbered folder within the media folder it just seems to forget to put the document in there!!

  • dandrayne 1138 posts 2262 karma points
    Jul 03, 2009 @ 17:27
    dandrayne
    0

    What kind of document is it?  If it's .docx and not .doc you may need to add the mime type to your server? (I know, I'm clutching at straws here!)

  • trfletch 598 posts 604 karma points
    Jul 07, 2009 @ 16:35
    trfletch
    0

    I have tried it with a number of different documents including just a txt document but the file doesn't even get placed in the folder structure so surely MIME types on the server would be irrelevant?

  • Arnold Visser 418 posts 778 karma points hq c-trib
    Oct 15, 2009 @ 16:53
    Arnold Visser
    0

    I've got the exact same problem. Folder is created, but file isn't placed in it...

    Very strange, tried various persmissions and settings like maxrequestlenght.

    More strange: if I upload an image, the _thumb.jpg file is generated and placed in the folder, but the original file is not...

  • trfletch 598 posts 604 karma points
    Oct 16, 2009 @ 13:25
    trfletch
    0

    I never did manage to resolve this issue so if you have any luck please let me know.

  • trfletch 598 posts 604 karma points
    Feb 18, 2010 @ 18:49
    trfletch
    0

    Hello again,

    Did anyone ever manage to resolve this issue because it is something I need to once again look into. As previously mentioned when filling in the doc2form form and trying to upload a Word document it sends the email fine and the email has a link to the supposed document location but there is no document there! If I look in the folder structure for the website it has created the numbered folder under the media folder but it is completely empty unless as mentioned by a previous poster if the file is a JPG then the xxxxxxxxxxx_thumb.jpg file gets created in the folder but that is about it. I really hope someone can shed some light on this otherwise I may need to find another solution instead of doc2form.

    Many thanks

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Feb 23, 2010 @ 07:12
    Casey Neehouse
    0

    Are you saving the form to a node?  If not, I believe the upload field is now designed to delete upload files upon deletion.

    As an option, you could modify the code to attach the file to the email (some code rearrangement would be needed) .  The easier option is to save the posted form to a node.  You don't need to publish it, but it must be saved.  The control code is in the app_code folder of your site.

    By default, the posted form is saved to a node in the recycle bin unless a node is specified.  If it is in the recycle bin, it is deleted permanently at the end of the code.

    Hope this helps with what may be happening.

    Case

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Feb 23, 2010 @ 07:16
    Casey Neehouse
    0

    ahh.. edit would be nice..

    .... I believe the upload field is now designed to delete uploaded content upon NODE deletion...

    Since doc2form uses the umbraco document type structure, a node must be created to capture the data.  I just simply delete the node in email only form.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Feb 23, 2010 @ 09:47
    Lee Kelleher
    0

    Who's responsible for Doc2Form these days? Casey, is it still your project? Do you think there is room for further improvements - like email attachments?

    Also, is the latest and greatest version from the Umbraco Extensions project on CodePlex?

    I'd be interested in helping out with the development.

    Cheers, Lee.

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Feb 23, 2010 @ 11:51
    Ismail Mayat
    0

    Lee,

    I have a hacked up version that does html based templating, you create template in umbraco put fields in template like ##somefield## and they get replaced with field aliases.  

    Regards

    Ismail

  • trfletch 598 posts 604 karma points
    Feb 26, 2010 @ 13:32
    trfletch
    0

    Hi Casey,

    Thank you very much for the response, this is now working perfectly now that I have it saving the node as well as emailing it. This has been bugging me for ages. Thanks again.

  • ask 28 posts 48 karma points
    May 07, 2010 @ 09:10
    ask
    0

    Hello..

    i am looking for the similar concept..if you can share your ideas..

    thanks

  • trfletch 598 posts 604 karma points
    May 07, 2010 @ 12:22
    trfletch
    0

    Hi Ask,

    What is it you want to know, to make this work I just added an upload datatype to my doc2form form and made sure that I used the Doc2Form macro that saved the form results to a node rather than just using the email Doc2Form.

  • ask 28 posts 48 karma points
    Aug 27, 2010 @ 15:49
    ask
    0

    hello..,

    is it possible to send multiple files as attachment using doc2form?

    thank you.

  • trfletch 598 posts 604 karma points
    Aug 27, 2010 @ 17:50
    trfletch
    0

    Not sure, certainly not something I have tried myself. Have you tried it to see what happens?

  • ask 28 posts 48 karma points
    Aug 30, 2010 @ 12:37
    ask
    0
Please Sign in or register to post replies

Write your reply to:

Draft