Developer Support »

Autoresponder attachment path - send attachment based on form input  (See more user questions)

Good stuff, !

A path can literally be anything, depends on how the server is set up, but
yes, the second example looks like it might be right. Much better to
confirm with the host.

Best wishes,

Charles Sweeney
https://formtoemail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Monday, February 21, 2011 2:46 PM
Subject: Re: FormToEmail-Pro


> Excellent! Thank you AGAIN - it works beautifully on the dev site! Now I
> assume once our website goes live on www.example.com the server path
> will change from /home/example/public_html/Docs/ to
> /home/example2/public_html/Docs/, correct?
>
> You've been a tremendous help, Charles, and I really appreciate it. And I
> love this script! I plan on using it all over the site in the near future.
>
> Date: 02/18/2011 01:04 PM
> Subject: Re: FormToEmail-Pro
>
>
>
> Hi .
>
> You're doing a great job with that site!
>
> Sounds like you need a new host! That aside, yes the error message is
> perfect for getting the path to the web files in question here. You have
> this in the script:
>
> $autoresponder_attachment_path = "http://example.com/Docs/
> ";
>
> ...which is most definitely wrong, you can't have http:// for a path on a
> file system, that's for the web.
>
> This is the path to the root of the webspace, where you have my script
> (docDownload.php):
>
> /home/example/public_html/
>
> ...you will notice it begins with /home/...just like the example I give in
>
> the script instructions...a wee clue there!
>
> So the path to the ROOT OF YOUR WEBSPACE should you want to enter that in
> the script, would be this:
>
> $autoresponder_attachment_path = "/home/example/public_html/";
>
> Now. I don't know the name of the directory where you are storing the PDF
>
> files, you are keeping that secret from me, so I can't help much further
> to
> give you the exact path to enter in the script. That said, if you put the
>
> PDF files in the root web directory (the same directory where you have my
> script) then the above path is good. Which might be an idea just to get
> you
> up and running.
>
> What directory did you put the PDF files in?
>
> Best wishes.
>
> Charles Sweeney
> https://formtoemail.com
> The world's easiest feedback script!
>
> ----- Original Message -----
> Sent: Friday, February 18, 2011 2:52 PM
> Subject: Re: FormToEmail-Pro
>
>
>> Hi Charles, it's me again from several weeks ago. Your script magically
>> began working flawlessly on our dev site soon after our last email
>> (without any changes on my end), so I was very excited about that! You
> can
>> see it in action here:
>>
>> http://example.com/doclibrary.html
>>
>> This is exactly how I want it to perform!
>>
>> Now we've switched hosting companies and I can't get the form to work
>> again - I'm sure it's because I have the server path incorrect again.
> Our
>> new host provider won't answer their phone and our site goes live on
>> Monday. Here are the only details I have - can you make a guess as to
> what
>> the server path would be to get to my /Docs folder?
>>
>> Here's the link to the new location of our site, if you try to download
> a
>> document it gives an error (no emails) and references lines of the .php
>> file.
>>
>> Link: http://example.com/doclibrary.html
>>
>> Here is your .php script that I've modified:
>>
>>
>>
>>
>>
>> Date: 01/07/2011 03:21 PM
>> Subject: Re: FormToEmail-Pro
>>
>>
>>
>> Hi .
>>
>> Yes, you should still get the email from the script. Have a look at
> this
>> page on my support section:
>>
>> https://formtoemail.com/developersupport/not_receiving_email.php
>>
>> Sure that path is correct? Haven't seen one before that begins with
>> "/data"
>>
>> Charles Sweeney
>> https://formtoemail.com
>> The world's easiest feedback script!
>>
>> ----- Original Message -----
>> Sent: Friday, January 07, 2011 4:31 PM
>> Subject: Re: FormToEmail-Pro
>>
>>
>>> Sorry, it's me again.
>>>
>>> I did what you suggested and I have the path correct.
>>>
>>> We are not hosting the website, we have an offsite provider that has
>>> hosted our site in the past. I've used the full ftp path to my Docs
>> folder
>>> (/data/home/and/wwwroot/example.com/Docs/), but the customer side
>>> still doesn't receive an email with an attachment.
>>>
>>> On a positive side, when I fill out the form with my home email I am
>>> getting an email returned on my A&D side that says that someone
>> downloaded
>>> a pdf file from my website, which is perfect. However, I'm not
> receiving
>>> ANY email on my home email (customer) side. My question is this - even
>> if
>>> I have the path wrong for the autoresponder attachment shouldn't I
> still
>>> be getting an email, just without the attachment?
>>>
>>>
>>>
>>> Date: 01/05/2011 04:28 PM
>>> Subject: Re: FormToEmail-Pro
>>>
>>>
>>>
>>> Hi .
>>>
>>> You need the full server path to the files, like the examples I gave
>> you.
>>> The server path doesn't begin with http://, that's for the web. It's
>> the
>>> path "inside" the server. Ask your host about it or have a look around
>>> their support site.
>>>
>>> Here's something you can do. Put this in a text file:
>>>
>>> <?php
>>>
>>> phpinfo();
>>>
>>> ?>
>>>
>>> Save it by any name with a .php extension and upload it to your
> webspace
>>> and
>>> call it up in your browser. You will see a lot of information about
>> your
>>> server setup. Look for this: "DOCUMENT_ROOT". That will show your
>> server
>>>
>>> path to your webspace. You need to add your "Docs" directory and a
>>> trailing
>>> slash to it. That is what you need to enter in the script. Like this
>> for
>>> a
>>> Unix server:
>>>
>>> /home/username/public_html/Docs/
>>>
>>> ...or the equivalent for a Windows server.
>>>
>>> Cheers.
>>>
>>> Charles Sweeney
>>> https://formtoemail.com
>>> The world's easiest feedback script!
>>>
>>> ----- Original Message -----
>>> Sent: Wednesday, January 05, 2011 3:42 PM
>>> Subject: Re: FormToEmail-Pro
>>>
>>>
>>>> Sorry to be such a pain, but I still can't get it to work. My pdf
> files
>>>> are on http://example.com/Docs/, so do I do this?
>>>>
>>>> $autoresponder_attachment_path = "http://example.com/Docs/";
>>>>
>>>> Date: 01/04/2011 05:39 PM
>>>> Subject: Re: FormToEmail-Pro
>>>>
>>>>
>>>>
>>>> Hi .
>>>>
>>>> You need to put the full server path to the directory that the files
>> are
>>>> in,
>>>> and you must have a trailing slash (just like it says in the
>>>> instructions!).
>>>>
>>>> You have this:
>>>>
>>>> $autoresponder_attachment_path = "/Docs";
>>>>
>>>> Needs to be something like this:
>>>>
>>>> $autoresponder_attachment_path = "/home/some_user/Docs/";
>>>>
>>>> ...or on Windows:
>>>>
>>>> $autoresponder_attachment_path = "c:/home/some_user/Docs/";
>>>>
>>>> Cheers.
>>>>
>>>> Charles Sweeney
>>>> https://formtoemail.com
>>>> The world's easiest feedback script!
>>>>
>>>> ----- Original Message -----
>>>> Sent: Tuesday, January 04, 2011 7:05 PM
>>>> Subject: Re: FormToEmail-Pro
>>>>
>>>>
>>>>>I just did this but I'm not getting an email with the attachment. Did
> I
>>>> do
>>>>> something wrong?
>>>>>
>>>>> My sandbox is http://example.com/doclibrary.html
>>>>>
>>>>> Once I get this working I should be all set. Thanks so much!
>>>>>
>>>>> Date: 01/03/2011 04:56 PM
>>>>> Subject: Re: FormToEmail-Pro
>>>>>
>>>>>
>>>>>
>>>>> Hi .
>>>>>
>>>>> Sorry, I can't do that for you. You are looking at a custom solution
>>>>> there.
>>>>>
>>>>> That said, just thinking about it, you could have a one form with a
>>>>> drop-down menu on it containing a list of the PDF files, one of which
>>>> the
>>>>> visitor must select. When they submit the form the chosen PDF file
>>> will
>>>>> be
>>>>> attached. Here's how to do it. Put a select input (drop-down) on
>> your
>>>>> form, like this:
>>>>>
>>>>> <select name="pdf_attachment">
>>>>> <option value="">Click to select</option>
>>>>> <option value="file1.pdf">File 1</option>
>>>>> <option value="file2.pdf">File 2</option>
>>>>> <option value="file3.pdf">File 3</option>
>>>>> </select>
>>>>>
>>>>> Then edit the autoresponder attachment code in the script.
>>>>>
>>>>> Change this:
>>>>>
>>>>> $autoresponder_attachment_file = "";
>>>>>
>>>>> ...to this:
>>>>>
>>>>> $autoresponder_attachment_file = $_REQUEST['pdf_attachment'];
>>>>>
>>>>> Remember to enable the autoresponder attachment like so:
>>>>>
>>>>> $autoresponder_attachment = 1;
>>>>>
>>>>> ...and to enter the path to the files on your server, e.g:
>>>>>
>>>>> $autoresponder_attachment_path = "/home/username/files/";
>>>>>
>>>>> Remember also to enable the autoresponse:
>>>>>
>>>>> $autoresponder = 1;
>>>>>
>>>>> Then the selected file will be attached to the autoresponse.
>>>>>
>>>>> Some points. Change "file1.pdf" etc to the exact names of the PDF
>>>> files.
>>>>> Where "File 1" etc appears in the drop-down is just text, change this
>>> to
>>>>> suit. Equally, change "Click to select" to suit. You can put the
>>>>> drop-down
>>>>> in the list of required fields if you wish, put in "pdf_attachment".
>>>>>
>>>>> Best wishes.
>>>>>
>>>>> Charles Sweeney
>>>>> https://formtoemail.com
>>>>> The world's easiest feedback script!
>>>>>
>>>>> ----- Original Message -----
>>>>> Sent: Monday, January 03, 2011 7:16 PM
>>>>> Subject: Re: FormToEmail-Pro
>>>>>
>>>>>
>>>>>> Hello again, Charles!
>>>>>>
>>>>>> I have a question on the formtoemail functionality. As we discussed
>>>>> quite
>>>>>> a while ago, I have a document library of pdfs on my site. Since I'm
>>>> not
>>>>> a
>>>>>> web developer AT ALL I was wondering if you could send me the code
> to
>>>>> have
>>>>>> the standard form (Name, Email, Comments) pop up in a custom-sized
>>>>> window
>>>>>> from which the user would enter his info. I'll be using the
>>>>> autoresponder
>>>>>> feature to then email the requested document back to the user once
> he
>>>>>> fills out the form. Since all of the pdfs are on one page I don't
>> want
>>>>> to
>>>>>> have a visible form for each one, do you know what I mean?
>>>>>>
>>>>>> I just want them to click on a link for the document, enter their
>>>>> details
>>>>>> in the small popup window, and then have the document emailed to
>> them.
>>>>> Is
>>>>>> this possible? If I can get this working I will be ecstatic - I
>>>>> absolutely
>>>>>> love the feature-set and security of your form!
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> Date: 11/30/2010 11:56 AM
>>>>>> Subject: Re: FormToEmail-Pro
>>>>>>
>>>>>>
>>>>>>
>>>>>> My pleasure, !
>>>>>>
>>>>>> Best thing to do is try it, experiment with it.
>>>>>>
>>>>>> Any questions, just let me know.
>>>>>>
>>>>>> Best wishes.
>>>>>>
>>>>>> Charles Sweeney
>>>>>> https://formtoemail.com
>>>>>> The world's easiest feedback script!
>>>>>>
>>>>>> Sent: Tuesday, November 30, 2010 3:01 PM
>>>>>> Subject: Re: FormToEmail-Pro
>>>>>>
>>>>>>
>>>>>>> Perfect - thank you so much for your helpful response!
>>>>>>>
>>>>>>> Date: 11/30/2010 09:58 AM
>>>>>>> Subject: Re: FormToEmail-Pro
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi .
>>>>>>>
>>>>>>>> I was wondering, if I put each of the pdfs in it's own folder with
>>>> its
>>>>>>> own
>>>>>>>> form-to-email script, could I then just point to that document's
>>>> form?
>>>>>>>
>>>>>>> That's a good suggestion.
>>>>>>>
>>>>>>> You wouldn't even need to put the pdfs or the scripts in their own
>>>>>>> folders.
>>>>>>> In each script configuration you can state the name and location of
>>>> the
>>>>>>> pdf
>>>>>>> file for that scirpt. Just give each script a different name and
>>>>> change
>>>>>>> the
>>>>>>> form action of each form to point to the correct script. Just an
>>>>>>> alternative way of doing.
>>>>>>>
>>>>>>> You would then need to enable the option to attach the pdf to the
>>>>>>> autoresponse. The visitor would then get an email with the pdf
>>>>>> attached.
>>>>>>> Is that what you want?
>>>>>>>
>>>>>>> Charles Sweeney
>>>>>>> https://formtoemail.com
>>>>>>> The world's easiest feedback script!
>>>>>>>
>>>>>>> ----- Original Message -----
>>>>>>> Sent: Tuesday, November 30, 2010 1:10 PM
>>>>>>> Subject: Re: FormToEmail-Pro
>>>>>>>
>>>>>>>
>>>>>>>> That would definitely be the preferred method. However, since my
>>> site
>>>>>> is
>>>>>>> a
>>>>>>>> flash site that pulls info from an xml page I don't have separate
>>>> html
>>>>>>>> files to point to. My site url is the same no matter what page you
>>>> are
>>>>>>> on
>>>>>>>> so there's no linking of pages, thus no way (at least that I know
>>> of)
>>>>>> to
>>>>>>>> "point" to a download page.
>>>>>>>>
>>>>>>>> I was wondering, if I put each of the pdfs in it's own folder with
>>>> its
>>>>>>> own
>>>>>>>> form-to-email script, could I then just point to that document's
>>>> form?
>>>>>>>> That way site visitors could view the documents available, click
>> the
>>>>>> one
>>>>>>>> they want to download, and fill out that document's form. Is this
> a
>>>>>>>> possibility?
>>>>>>>>
>>>>>>>> Sorry for being a pest, I just don't want to go through the work
> if
>>>>> the
>>>>>>>> script won't support the function.
>>>>>>>>
>>>>>>>> Date: 11/29/2010 05:47 PM
>>>>>>>> Subject: Re: FormToEmail-Pro
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi .
>>>>>>>>
>>>>>>>> Sounds like you need more than a straight form-to-email script.
>>>>>>>>
>>>>>>>> What my script will easily do is send an autoresponse email to
>>>> someone
>>>>>>>> filling out your form, and attach a file to it. No problem. But
>>> you
>>>>>>> have
>>>>>>>> a
>>>>>>>> number of documents, you can only attach one file to the
>>> autoresponse
>>>>>>>> email.
>>>>>>>>
>>>>>>>> If you simply just want to redirect a visitor to yor doanload page
>>>> for
>>>>>>> all
>>>>>>>>
>>>>>>>> the documents, you can enable the autoredirect option in the
>> script.
>>>>>>>> Whereupon when the visitor submits the form they will get
>>>>> automatically
>>>>>>>> redirected to your download page. Wouldn't that be better?
>>>>>>>>
>>>>>>>> There's full instructions in the script for the autoredirect and
>> the
>>>>>>>> autoresponse. The autoredirect is usually known as a "thank you"
>>>> page
>>>>>>> and
>>>>>>>>
>>>>>>>> is the page the visitor gets when successfully submitting the
> form.
>>>> In
>>>>>>>> this
>>>>>>>> case, you could make the download page your "thank you" page.
>>>>>>>>
>>>>>>>> Any questions just let me know but please read the script
>>>> instructions
>>>>>>> and
>>>>>>>>
>>>>>>>> the items on my support section first.
>>>>>>>>
>>>>>>>> Best wishes.
>>>>>>>>
>>>>>>>> Charles Sweeney
>>>>>>>> https://formtoemail.com
>>>>>>>> The world's easiest feedback script!
>>>>>>>>
>>>>>>>> ----- Original Message -----
>>>>>>>> Sent: Monday, November 29, 2010 8:41 PM
>>>>>>>> Subject: Re: FormToEmail-Pro
>>>>>>>>
>>>>>>>>
>>>>>>>>> Help!
>>>>>>>>>
>>>>>>>>> I'm developing a Flash website for my company based off a Flash
>>>>>>> template
>>>>>>>>> that pulls in values from an xml file. I am not a programmer, not
>>>>> even
>>>>>>>>> close, so all of this is new to me.
>>>>>>>>>
>>>>>>>>> Here's what I need to do: I have a "Document Library" section of
>> my
>>>>>>>>> website that has approximately 20-30 pdf documents for download.
>>>>>>>> However,
>>>>>>>>> what we need to do is enable a simple form (like yours) that will
>>>> let
>>>>>>> us
>>>>>>>>> require a contact email/name first. So if a customer wants to
>>>>> download
>>>>>>> a
>>>>>>>>> workshop syllabus, he has to enter a contact name before he gets
>>>>>>> access.
>>>>>>>> I
>>>>>>>>> see your form allows me to attach a file to the redirect screen,
>>>>> which
>>>>>>>> is
>>>>>>>>> fabulous, but how do I insert the script for each file? Here's my
>>>>>>>> website
>>>>>>>>> so you can get an idea what I'm talking about:
>>>>>>>>>
>>>>>>>>> http://example.com
>>>>>>>>>
>>>>>>>>> Just click the "About Us" tab and you'll see the Document
> Library
>>>>>> link
>>>>>>>> at
>>>>>>>>> the bottom.
>>>>>>>>>
>>>>>>>>> Thank you so much!