PDA

View Full Version : how to send attachments with the email and not upload them?



NearDark.de
12-Oct-2007, 09:22 AM
I am interested to find out, how one goes about setting the script to send attachments, with the email, as opposed to uploading to the server?

This is because, our sales staff that want to receive the new customer account enquiries and attachments, are not so tech savvy and would prefer to not have to learn and use an ftp app to get them.

Plus, though I have had it working, it seems when most potential customers send an attachment, it does not get uploaded to the server, is there some requirement, like no spaces in file name or some other possible reason, why it did work for me in test and now does not.

To assist, our form is here: https://www.neardark.de/shop_content.php/coID/25/content/Request-Account which is embedded in XT Commerce a Euro centric opensource shop platform. The file directly can be found here: https://www.neardark.de/media/content/account_form-en.html?

and the script is, here: https://www.neardark.de/media/content/open_account.php

thanks in advance,

Richard

p.s. this is a great script, the best I have come across :-)

rosy
22-Oct-2007, 07:11 PM
Hi,
I am also looking for the same. I just want to upload file as attachment and send it through email in the form.
How do i need to configure the info in FormMail.pl
My version of FormMail.pl is Version 1.92
Any help would be appreciated.
Thanks,
Rosy.

russellr
22-Oct-2007, 08:40 PM
Hi,

rosy: we can't help you with FormMail.pl. This site is about Tectite FormMail.

NearDark.de: sorry for the delay in responding. Somehow, your post "slipped through the cracks". 11 days to respond is not good enough. :o

If you configure your form to upload files, FormMail will automatically attach the uploaded files to the email it sends.

I believe this is what you want. If so, just read the HOW TO guide for uploading files and you'll be set.

It's also possible to store the files on the server instead of attaching them to the email, but you have to make specific configurations of FormMail to achieve that.

rosy
23-Oct-2007, 03:35 PM
Hi,
Thanks and sorry to bother you.
Could you please help me where i can find solutions for - uploading files as attachment while sending mails.
Bcoz i googled, i could not find the right place.
Thanks,
Rosy.

russellr
24-Oct-2007, 06:58 AM
Hi,

Tectite FormMail can help you do this.

The HOW TO guides are here (http://www.tectite.com/fmhowto/guides.php), but you should start with the Configuration Wizard: http://www.tectite.com/wizards/fmconf.php

NearDark.de
24-Oct-2007, 01:02 PM
thanks Russell, yeah I was begining to wonder if you were still active ;) and was just coming back to ask such, when I saw your reply, becuase I never got an email telling me you had replied, but I did for the lady before.

about the form, it is better, I had missed out the enctype="multipart/form-data" in the forms criteria, so now they upload to the server great, but nothing comes though on the Email, - I have the inthe formmail.php (although called differntly on our server) this setting-
file: define("FILEUPLOADS",true);
so, my question, may sound silly and obvious, but if I set that to false, would they arrive attached to the email?

Incase you want to check it out, I have re-done the form, using tables to control the two colunms, becuase I was finding to many variations just using CSS, to make it worth persisting with, here:
https://www.neardark.de/media/content/request_account-en-table.html

many thanks

rains <nickname>

rosy
24-Oct-2007, 08:13 PM
Hi Russell,
Thanks very much.
I tried but i could not able to send mail, i got errors to check for recipients. without adding the file upload its working properly.
I am using Matt's archive FormMail.pl

I modified in form.php


<FORM method="POST" action="http://myweb/cgi-bin/FormMail.pl" name=driver_info enctype="multipart/form-data">

<tr>
<td>Attach a File(Word/Excel):</td>
<td><input name="email_attachment" type="file" id="email_attachment"></td>
<td colspan="3" rowspan="2">&nbsp;</td>
</tr>


in FormMail.pl
I added
define("FILEUPLOADS",true);
eventhough i get some errors.
So will you please help me on how to configure FormMail.pl
Thanks,
Rosy.

russellr
24-Oct-2007, 08:34 PM
Hi,

This site is not about Matt's FormMail. We don't provide support for it.

russellr
24-Oct-2007, 08:43 PM
Hi,



file: define("FILEUPLOADS",true);
so, my question, may sound silly and obvious, but if I set that to false, would they arrive attached to the email?


FormMail will refuse to accept file uploads if you set it to false, so it must be set to true.

As I mentioned before, FormMail just attaches file uplaods by default.

It sounds like you have a problem on your server or with email formatting.

If you subscribe for support, I'll be happy to look at it for you.

Romuba
07-Jul-2008, 10:37 AM
Hi Russell

I have read all the above posts as I want to have the following occur:


Visitor completes Subscription form on a website.
Thank You page displays for the Visitor.
Email sent to my email address telling me of a new subscription.
Email sent to Visitor thanking him for subscribing as well as sending him a copy of my latest newsletter.Point 4 is the one I am battling with. In the HOW TO Guides I see how one can enable the Visitor to upload a file (or files) but I can't figure out how I can get my form to send a specific file to the Visitor.

russellr
07-Jul-2008, 09:09 PM
Hi Ross,

That step 4 of yours is what we call Autoresponding.

The HOW TO guide is here: http://www.tectite.com/fmhowto/autorespond.php

Currently, Autoresponding can only send a "flat" email with no attachments.

Autoresponding with attachments could be a feature we'd add to FormMail in the future.

In the meantime, you could provide a web link to your newsletter (inside the email) instead.

Romuba
08-Jul-2008, 08:11 AM
Hi Russell

Thanks for your answer. I am rather disappointed that you haven't got this feature yet as I have been VERY impressed with the Tectite system of Formmail. Certainly the best I have come across and way better than the opposition.

I already thought of having a link in the welcome email but that is a little second rate and it isn't what I am really after.

Do you have any other suggestions or another option for me to try so that I can get the file attached?

The full procedure need to be as follows:


There needs to be a form on the website for the visitor to enter their Name and Email address - Tectite provides for this.
When the form is submitted a thank you page is shown reflecting some of the entered details - Tectite provides for this.
An email is then sent to my email address telling me that there has been a new subscriber - Tectite provides for this.
At the same time the details of the new subscriber are entered into a database which can be used for mass mailing at a later stage - Tectite provides for this.
The visitor receives an email thanking them for subscribing and has the latest Newsletter attached - Tectite doesn't yet provide for this.
When the monthly emails are sent out with the new Newsletter there needs to be a facility for unsubscribing which will then remove the customer's details from the database and also show them a page thanking them for their support but sorry to see them go. Also to have a link back to the website - Tectite doesn't yet provide for this (to the best of my knowledge).
This is the system that I need in a nutshell.

russellr
08-Jul-2008, 06:50 PM
Hi,


Do you have any other suggestions or another option for me to try so that I can get the file attached?


It requires writing some PHP. FormMail has a Hook System (not documented yet) that a PHP programmer can easily utilize.

But, ultimately, it's about analysing the FormMail code and then utilizing its functions to perform the attachment when the autoresponse email is sent.

It's not hard to do for even a moderately-experienced PHP programmer, but it does require some effort.



6. When the monthly emails are sent out with the new Newsletter there needs to be a facility for unsubscribing which will then remove the customer's details from the database and also show them a page thanking them for their support but sorry to see them go. Also to have a link back to the website - Tectite doesn't yet provide for this (to the best of my knowledge).


This is really a function of your database system and nothing to do with FormMail.

FormMail is for actioning a user's form submission.

It's not a full Customer Relationship Management System (though we do have a CRM that you can utilize - US$45 per month).

Romuba
08-Jul-2008, 06:54 PM
Thank you very much for your repply Russell. I don't know PHP at all so that won't work for me at the moment.

I will see what I can find elsewhere then.