# Form with attachments help!

**URL:** <https://forum.kirupa.com/t/form-with-attachments-help/265608>\
**Category:** Uncategorized\
**Created:** [July 10, 2008, 5:42pm UTC](https://forum.kirupa.com/t/form-with-attachments-help/265608 "2008-07-10T17:42:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirkslater](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@kirkslater](https://forum.kirupa.com/u/kirkslater)\
**Post date:** [July 10, 2008, 5:42pm UTC](https://forum.kirupa.com/t/form-with-attachments-help/265608/1 "2008-07-10T17:42:16Z")

</div>

Hi there

I wonder if anyone has any ideas

I want to have a form on my flash site that, along with text fields, is able to attach a file/image to and send to an email account.

Now the problem is that, my sever can’t have its permissions changed and therefore the file/image has nowhere to sit before being sent on to the email account.

Does anyone have any ideas? I’ve tried just PHP with text to an email and that works fine as the permissions to anything on the sever don’t need to change.

I don’t really want to resort to a file uploading hosting site as I really want it all on my site.

Is there a way that flash or html (or whatever) can use the settings from a POP email account to send a form with and attachment?

Any help is greatly appreciated

Cheers

---

<div class="post-metadata">

**Author:** ![jwilliam](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jwilliam](https://forum.kirupa.com/u/jwilliam)\
**Post date:** [July 10, 2008, 7:53pm UTC](https://forum.kirupa.com/t/form-with-attachments-help/265608/2 "2008-07-10T19:53:06Z")

</div>

Yes, you can send an email with an attachment using various different programming languages. Google the topic and you’ll find all kinds of stuff.

Uploading and emailing it without storing the file on the server is a more interesting question. I don’t really have time to research it for you, but I’d begin by looking into PERL. CGI has access to the raw http headers, so you may be able to store the file in memory until it is uploaded completely and then attach it to an email without ever having to write it to disk. If you don’t have CGI on your account then, obviously, you can’t do this.

Hope this helps…

---

<div class="post-metadata">

**Author:** ![kirkslater](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@kirkslater](https://forum.kirupa.com/u/kirkslater)\
**Post date:** [July 12, 2008, 2:59pm UTC](https://forum.kirupa.com/t/form-with-attachments-help/265608/3 "2008-07-12T14:59:33Z")

</div>

Thanks, I’ll give that a look

[quote=jwilliam;2356447]Yes, you can send an email with an attachment using various different programming languages. Google the topic and you’ll find all kinds of stuff.

Uploading and emailing it without storing the file on the server is a more interesting question. I don’t really have time to research it for you, but I’d begin by looking into PERL. CGI has access to the raw http headers, so you may be able to store the file in memory until it is uploaded completely and then attach it to an email without ever having to write it to disk. If you don’t have CGI on your account then, obviously, you can’t do this.

Hope this helps…[/quote]

---

<div class="post-metadata">

**Author:** ![BenBart](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@BenBart](https://forum.kirupa.com/u/BenBart)\
**Post date:** [July 12, 2008, 5:48pm UTC](https://forum.kirupa.com/t/form-with-attachments-help/265608/4 "2008-07-12T17:48:47Z")

</div>

> [@kirkslater;2357436](#):
>
> Thanks, I’ll give that a look

Perhaps someone has made a webmail API you could use?

Or perhaps you could convert the file into a string? I know there are PHP codes to do that. But I don’t know anything about using them 🙂

[http://us2.php.net/manual/en/function.file-get-contents.php](http://us2.php.net/manual/en/function.file-get-contents.php)
