Thread View: demon.ip.www
7 messages
7 total messages
Started by Pete Bennett
Tue, 19 Sep 2000 00:00
Is it possible to upload and mail attachments within home page pls?
Author: Pete Bennett
Date: Tue, 19 Sep 2000 00:00
Date: Tue, 19 Sep 2000 00:00
18 lines
1359 bytes
1359 bytes
I have a form on my homepage (URL in sig) under the 'join us' section
which invites people to enter some brief details about them self. It
also asks them to email a copy of their CV. I'd really like to make it
easier for people to respond by providing a facility for them to upload
their CV directly into the site using a dialog box and then have the CGI
script mail it to me as an attachment .... is this possible with Demon
please (I have access to a Demon Diva account for running CGIs).
Thanks.
--
Kind Regards,
Pete Bennett
future implications Japanese language services (UK)
tele : +44 (0)208 661 7699
mailto: pmb1@futureim.demon.co.uk
www : http://www.filanguage.demon.co.uk
Re: Is it possible to upload and mail attachments within home page pls?
Author: Andrew Haylett
Date: Tue, 19 Sep 2000 00:00
Date: Tue, 19 Sep 2000 00:00
45 lines
2532 bytes
2532 bytes
Pete Bennett (SPAM_B_GONE@futureim.demon.co.uk) wrote:
: I have a form on my homepage (URL in sig) under the 'join us' section
: which invites people to enter some brief details about them self. It
: also asks them to email a copy of their CV. I'd really like to make it
: easier for people to respond by providing a facility for them to upload
: their CV directly into the site using a dialog box and then have the CGI
: script mail it to me as an attachment .... is this possible with Demon
: please (I have access to a Demon Diva account for running CGIs).
It's not that difficult to hand-code Perl code that creates multi-part
messages. I do that with one of our scripts that generates mail as a
result of a sales enquiry or registration; it wraps up the person's
details in a V-Card structure and bundles it as a text attachment to
the email that gets auto-sent to us. Just put something like:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_NextPart_=------"
in the header of the email, and then the appropriate lines:
------=_NextPart_=----
Content-Type: text/plain
Content-Transfer-Encoding: 7BIT
or
------=_NextPart_=----
Content-Type: application/octet-stream
Content-Transfer-Encoding: BASE64
before each part. Then you need this at the end:
------=_NextPart_=------
Uploading files is straightforward - just use the facilities in CGI.pm
or cgi-lib.pl. You then have to encode the uploaded file into base64,
and I'm sure there are Perl modules to do this (or code it by hand).
Hope this helps,
Andrew.
--
Andrew Haylett Tel. +44 1763 852222 Fax. +44 1763 853324
Software Engineer, Webmaster Email: ajh@primag.co.uk
Primagraphics, Nr. Cambridge, UK Web: http://www.primagraphics.co.uk/
Re: Is it possible to upload and mail attachments within home page pls?
Author: Richard Clayton
Date: Wed, 20 Sep 2000 00:00
Date: Wed, 20 Sep 2000 00:00
35 lines
1696 bytes
1696 bytes
In article <8q7c9d$183$1@atlas.primag>, Andrew Haylett
<ajh@primag.co.uk> writes
>Just put something like:
>
> MIME-Version: 1.0
> Content-Type: multipart/mixed; boundary="----=_NextPart_=------"
four leading --s and six trailing ... think you meant four trailing :(
>in the header of the email, and then the appropriate lines:
>
> ------=_NextPart_=----
because this should be the boundary preceded by --
> Content-Type: text/plain
> Content-Transfer-Encoding: 7BIT
>
>or
>
> ------=_NextPart_=----
> Content-Type: application/octet-stream
> Content-Transfer-Encoding: BASE64
>
>before each part. Then you need this at the end:
>
> ------=_NextPart_=------
and this should be the boundary preceded AND trailed by --
--
richard @ turnpike . com "Nothing seems the same
Still you never see the change from day to day
And no-one notices the customs slip away"
Re: Is it possible to upload and mail attachments within home page pls?
Author: Andrew Haylett
Date: Wed, 20 Sep 2000 00:00
Date: Wed, 20 Sep 2000 00:00
22 lines
1609 bytes
1609 bytes
Richard Clayton (richard@turnpike.com) wrote: : In article <8q7c9d$183$1@atlas.primag>, Andrew Haylett : <ajh@primag.co.uk> writes : >Just put something like: : > : > MIME-Version: 1.0 : > Content-Type: multipart/mixed; boundary="----=_NextPart_=------" : four leading --s and six trailing ... think you meant four trailing :( You're quite right, of course; I managed to cut and paste it incorrectly from my CGI script, quite an achievement. I was hoping that someone would come along and say, "Ditch all that reverse-engineered homebrew stuff, use Perl module xxx for multi-part base64 mail, available on Demon's servers." Perhaps... -- Andrew Haylett Tel. +44 1763 852222 Fax. +44 1763 853324 Software Engineer, Webmaster Email: ajh@primag.co.uk Primagraphics, Nr. Cambridge, UK Web: http://www.primagraphics.co.uk/
Re: Is it possible to upload and mail attachments within home page pls?
Author: Mike Bristow
Date: Wed, 20 Sep 2000 00:00
Date: Wed, 20 Sep 2000 00:00
26 lines
1468 bytes
1468 bytes
On 20 Sep 2000 13:32:44 GMT, Andrew Haylett <ajh@primag.co.uk> wrote:
>I was hoping that someone would come along and say, "Ditch all that
>reverse-engineered homebrew stuff, use Perl module xxx for multi-part
>base64 mail, available on Demon's servers." Perhaps...
MIME::Lite.
Install it in your home directory if ain't already on the servers; generally
this is something like:
% gunzip super-duper.tar.gz
% tar -xf super-duper.tar
% cd super-duper
% perl Makefile.PL PREFIX=/your/cgi-bin/lib
% make
% make test
% make install
You then need to put:
BEGIN { unshift @INC, '/your/cgi-bin/lib'; }
in your script before you "use Super::Duper"
(although the paths are almost certainly wrong in many interesting ways)
--
Mike Bristow, seebitwopie
Re: Is it possible to upload and mail attachments within home page pls?
Author: Andrew Haylett
Date: Wed, 20 Sep 2000 00:00
Date: Wed, 20 Sep 2000 00:00
42 lines
1921 bytes
1921 bytes
Mike Bristow (mike@urgle.com) wrote:
: MIME::Lite.
: Install it in your home directory if ain't already on the servers; generally
: this is something like:
: % gunzip super-duper.tar.gz
: % tar -xf super-duper.tar
: % cd super-duper
: % perl Makefile.PL PREFIX=/your/cgi-bin/lib
: % make
: % make test
: % make install
Hmm, let's try...
Connected to uk-0-front.www.demon.net.
Escape character is '^]'.
UNIX(r) System V Release 4.0 (uk-0.www.demon.net)
login: xxxxxx
Password:
Last login: Wed Sep 20 13:46:17 from 158.152.57.99
$ perl
sh: perl: not found
$ make
sh: make: not found
$
And according to
http://cgi.www.primagraphics.co.uk/cgi-bin/www.primag.co.uk/servinfo.pl
it doesn't seem to be installed on the server already.
Yes, I guess one can munge MIME::Lite into place by hand, but it's tedious...
Andrew.
--
Andrew Haylett Tel. +44 1763 852222 Fax. +44 1763 853324
Software Engineer, Webmaster Email: ajh@primag.co.uk
Primagraphics, Nr. Cambridge, UK Web: http://www.primagraphics.co.uk/
Re: Is it possible to upload and mail attachments within home page pls?
Author: Pete Bennett
Date: Sun, 10 Dec 2000 14:56
Date: Sun, 10 Dec 2000 14:56
61 lines
3228 bytes
3228 bytes
Now that I have my Showroom account, I'd really like to get an upload
facility on my site. Sorry if my questions are a bit dumb but I am new
to this.
In article <8q7c9d$183$1@atlas.primag>, Andrew Haylett
<ajh@primag.co.uk> writes
>Pete Bennett (SPAM_B_GONE@futureim.demon.co.uk) wrote:
>
>: I have a form on my homepage (URL in sig) under the 'join us' section
>: which invites people to enter some brief details about them self. It
>: also asks them to email a copy of their CV. I'd really like to make it
>: easier for people to respond by providing a facility for them to upload
>: their CV directly into the site using a dialog box and then have the CGI
>: script mail it to me as an attachment .... is this possible with Demon
>: please (I have access to a Demon Diva account for running CGIs).
>
>It's not that difficult to hand-code Perl code that creates multi-part
>messages. I do that with one of our scripts that generates mail as a
>result of a sales enquiry or registration; it wraps up the person's
>details in a V-Card structure and bundles it as a text attachment to
>the email that gets auto-sent to us. Just put something like:
>
> MIME-Version: 1.0
> Content-Type: multipart/mixed; boundary="----=_NextPart_=------"
>
>in the header of the email, and then the appropriate lines:
>
> ------=_NextPart_=----
> Content-Type: text/plain
> Content-Transfer-Encoding: 7BIT
>
>or
>
> ------=_NextPart_=----
> Content-Type: application/octet-stream
> Content-Transfer-Encoding: BASE64
>
>before each part. Then you need this at the end:
>
> ------=_NextPart_=------
>
I understand this in concept but I expect the actual implementation will
be a bit more tricky... still that is the way to learn.
>Uploading files is straightforward - just use the facilities in CGI.pm
>or cgi-lib.pl. You then have to encode the uploaded file into base64,
>and I'm sure there are Perl modules to do this (or code it by hand).
Please could you tell me what CGI.pm is and where to get it? (likewise
cgi-lib.pl)
Thanks
--
Kind Regards,
Pete Bennett
tel : +44 (0)7021 116 247
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads