Sending files by form

Insajd_Design 04 Dec, 2007
Hello!

I'd like my script to be able too send an attached file to a specific e-mail adress.

Is this possible?
GreyHead 04 Dec, 2007
Hi Insajd_Design.

Yes it is, please say exactly what you want to do so we can tell you how to do it.

Are these uploaded files? Or files stored on the server? Where does the email address come from?

Bob
Insajd_Design 04 Dec, 2007
The files is provided by the user, from their local computer.

Here is the code:

<label>Välj rubrik:
<select name="Rubrik" id="Rubrik">
<option>Säljes</option>
<option>Köpes</option>
<option>Bytes</option>
<option>Skes</option>
</select>
</label>
<label>Ditt namn:
<input type="text" name="namn" id="namn">
</label>
<label>Din e-mail:
<input type="text" name="email" id="email">
</label>
<label>Din telefon:
<input type="text" name="telefon" id="telefon">
</label>
<label>Din mobiltelefon:
<input type="text" name="mobil" id="mobil">
</label>
<br>
<label>Annonstext:
<textarea name="Säljes" id="Säljes" cols="45" rows="5"></textarea>
</label>
<p>Max: 40 ord</p>
<label>
<input type="hidden" name"MAX_FILE_SIZE" value="500" />
<input name="file_1" value="upload" type="file">
</label>
<label>
<input type="submit" name="submit" id="submit" value="Skicka">
</label>

The mail is provided in chronoforms "to mail" field.
I want the script to attach a image file to the mail sent.

Sorry for the partial Swedish in the code.<br><br>Post edited by: Insajd_Design, at: 2007/12/04 07:41
GreyHead 04 Dec, 2007
Hi Isjad_Design,

There are two steps to this, first you need to enable form uploads to work with this form. Please see this FAQ.

From memory, I think that ChronoForms attaches a link to the file in its email. You can change this to attach the file if that's what you need.

Bob
lbmyren 04 Dec, 2007
Hi,

I'm using ChronoForms (2.5 J1.5 RC1 on Joomla! 1.5 RC3), but I can't get the file upload to work in my form.

I've followed the FAQ, but no file is uploaded and no link is sent in the e-mail.

My code is:
<label>
<input type="file" name="vedlegg1" id="vedlegg1" value="upload" />
</label>

Enable file upload = yes
Field names & allowed Extensions for each = vedlegg1:pdf|jpg|png|doc|odt|docx|zip|rar
Max allowable size = 8000
Min allowable size = 1
Form tag attachment = enctype='multipart/form-data'

Can anyone see what's wrong?

-larsbjarte-<br><br>Post edited by: GreyHead, at: 2007/12/04 15:10
GreyHead 04 Dec, 2007
Hi larsbjarte,

Everything there looks OK to me, please take a backup copy of the form in Forms Manager and either post her or email to me at the address below and I'll take a look.
Insajd_Design 04 Dec, 2007
Hi GreyHead!

I've done everything said in the FAQ you linked too. Now I need to know how to make the file attached to the mail...

With regards Insajd_Design
GreyHead 04 Dec, 2007
Hi Insajd_Design,

I've just been off and dug in the code and I think I was wrong before. ChronoForms should send the attachment by default . . . does it?

Bob
Insajd_Design 04 Dec, 2007
Depends on what you mean by Default. With or without enctype='multipart/tom-data' ?

At the moment I get the mail the form sends that should include a file with the adress to the file(not on the server) but on my computer >.<

Rubrik Säljes
namn Insajd
email [email]daniel@insajd.se[/email]
telefon +46-000000
mobil +4673-0000000
Säljes Just testing ya know
file_1 C:\\Documents and Settings\\daneri01\\My documents\\My photos\\262841_TC6A2SJ4V573ALG1QKP52TGL4T5EZA_naruhina6_H113209_L.jpg
submit Skicka

I couldn't by any chance add your msn or something? Then it would be easier to work >.<

msn: [email]cyfhen@hotmail.com[/email]<br><br>Post edited by: Insajd_Design, at: 2007/12/04 18:10
Max_admin 07 Dec, 2007
hi Insajd,

Once you add the enctype to the form tag and enable file uploads then the attachment should be sent OK!!

Whatst he problem you have exactly ?

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 07 Dec, 2007
Hi Max,

I think we sorted this in another thread.

Bob
Max_admin 11 Dec, 2007
Great, Thanks Bob!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.