Web Hosting Talk







View Full Version : Need Help on a mail script


Studio64
04-22-2002, 10:07 PM
I'm in the process of writing a scipt for a customer of mine.

His request was so that he can use a web based form to send out an e-mail to the customer database...

Easy straighforward I assumed... Simple php mail() interface w/ and pull the email's from the MySQL list...

Well my problem is that the HTML form where he would type in the email won't accept the usual size letters he wants to send out...

I'm not even entering in the mail() portion of the script...

It's just a simple form storing the data into <input type="hidden"> areas... Is this the problem... Can the http protocol only handle so much data?...

Would I have to either write to a static file or store the content of the email into the database in between pages (i.e. choosing which list the mail goes to?)....

After the email is entered into the <textarea> the submit button refuses to function... It will function when there is less content in the area which leads me to assume it's just a default proection against buffer overruns?...

Am I right...? Is the MySQL or static flat file the approiate work around?

webx
04-23-2002, 02:32 AM
I could not fully understand your question :) may be it's too late ;)

anyways, what ever I understand, here's what I would do. Upload the "email" file to the server, and put it in a buffer. And use it to send emails. You can use <input type=file ..> option to let the user upload a text of html file to the server.

After receiving the file, you can just do whatever you like. For example read it in a buffer and send it using mail() function. Or may be put it in database (temporary field) and use it to send emails.

Hope this helps :)

spock
04-23-2002, 07:18 AM
Originally posted by Studio64
It's just a simple form storing the data into <input type="hidden"> areas... Is this the problem... Can the http protocol only handle so much data?...
[/B]

Just an idea - are the form data being sent using the POST or GET method? GET won't handle a whole lot of data, so you should use POST for something like this.

webx
04-23-2002, 11:55 AM
Yes, post method. And if uploading file, don't forget to use ENCTYPE="multipart/form-data" in <form ...>