Results 1 to 7 of 7

Thread: Formmail: Can csv file be attached to email sent?

  1. #1
    Join Date
    May 2005
    Posts
    14

    Default Formmail: Can csv file be attached to email sent?

    Does anybody know if Formmail.php will send the csv file containing the data of the user who just submitted as an attachment to the email sent to the recipients?

    Awaiting any/your reply,

    railer

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Formmail: Can csv file be attached to email sent?

    Hi,

    No it doesn't do that.

    But you can use a Plain Template (see the HOW TO guide) to create a CSV format and send that.

    If you want it as an attachment, send it through the "null" filter and specify filter_options.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    May 2005
    Posts
    14

    Default Re: Formmail: Plain text csv template

    Hi Russ,

    Thanks, looks like a plain text csv template will do the trick. Haven't tested it yet as I'm still setting up the form and it was a lot of fields with some a bunch of conditions to set up (I'll post a different topic for that). I'm wondering if the mail header will still have the realname, email, and subject lines in it, even though I'm not including them as values in the formatted template? I assume so, as they are the special fields. Otherwise, the recipient (my client) won't really know who sent the messsage without digging into the values that were sent in the csv text.

    Thanks,

    railer

  4. #4
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Formmail: Can csv file be attached to email sent?

    Hi,

    I'm wondering if the mail header will still have the realname, email, and subject lines in it, even though I'm not including them as values in the formatted template? I assume so, as they are the special fields.
    Yes, that's correct.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    May 2005
    Posts
    14

    Default Re: Formmail: Can csv file be attached to email sent?

    Hi Russ, Awesome! I set up the form to attach the plain text csv template file with the form values to the email just like you described. Had to dig a bit to find how to make the "null" filter work, but in the end I was successful! Thanks.

    Here's the links to the pages I used:
    Plain Text Templates:
    http://www.tectite.com/fmhowto/plaintmplt.php

    Filters/Attachments:
    http://www.tectite.com/fmhowto/filters.php
    http://www.tectite.com/vbforums/showthread.php?t=435

    Btw, I know you were just going over the FormmailEncoder example in your Filters How-To but the part about editing the formmail.php $FILTERS array setting to include the "null" cat, as in the third link above would've been helpful, since it was crucial in getting it to work properly.

    Thanks again, for your help. Will be contacting you to purchase another fmencoder soon.

    Railer
    Last edited by railer; 23-May-2005 at 09:38 PM.

  6. #6
    Join Date
    Aug 2007
    Posts
    3

    Unhappy Re: Formmail: Can csv file be attached to email sent?

    Hi There,

    I have just implemented the changes to my php code, so that it attaches a "csv" file to the email, (as described in the previous posts)

    I used a Plain Template to create a CSV format, then sent it through the Null and specified filter options, just how you advised in the previous few posts on this thread. The csv attachment works fine, and the data is included in the file successfully.

    However, instead of putting the data in the csv attachment, plus sending it in the email body, it only sends it attached to a blank email, and doesn't include the data in the body of the email.

    I need it to send both data in the email and as an attachment. I assume there is a way of doing this.

    I have spent about a week configuring this script, and if I can't do this, then I will have to find another script. It would be a shame if I can't use this script for such a simple problem.

    I hope you can help.

    Kind regards,

    Adrian

  7. #7
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Formmail: Can csv file be attached to email sent?

    Hi,

    Yes, add "KeepInLine" to your filter_options value.

    For example:
    HTML Code:
    <input type="hidden" name="filter_options"
      value="Attach=data.csv,KeepInLine" />
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Attaching CSV file
    By eu4ic in forum FormMail Subscription Support
    Replies: 6
    Last Post: 01-Jun-2005, 10:58 PM
  2. Save to CSV file not working, Directory path
    By mkw in forum FormMail Subscription Support
    Replies: 3
    Last Post: 01-Oct-2004, 11:28 PM
  3. Downloading CSV file in Access
    By jgold723 in forum FormMail Subscription Support
    Replies: 2
    Last Post: 30-Aug-2004, 10:35 AM
  4. Formmail File Visible In URL Address
    By amazing616 in forum FormMail Subscription Support
    Replies: 5
    Last Post: 03-Jun-2004, 08:13 PM
  5. Help trying to set up a form to email and send info to file
    By rridsdale in forum FormMail Subscription Support
    Replies: 1
    Last Post: 14-Jan-2004, 02:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •