PDA

View Full Version : Need email sending solution...cgi form?


LeafWind
04-10-1999, 08:58 PM
As posted around various forums here on aota over the past few days, our dial-up access provider no longer allows us to send mail via an email program -- it will not connect to any SMTP host except for the ISP's own (for the ugly email account we got with the access service).

We're going to ditch this ISP and get cable access instead, but we're moving to a new apartment in three weeks and so need to wait to get it hooked up at the new place.

Still brainstorming about how we can send mail from our FQ email accounts for the next three weeks. Getting another dial-up account would be a waste, as all the locals have hefty set-up fees on top of the monthly minimum charges.

I'm thinking there might be a temporary tedious solution for us by using CGI on our webpage. That maybe we could set up a password-protected area where we could cut-and-paste any email we receive (which still works as normal) into a comments box and reply to it, with our address as the "from" and we'd be able to fill out the recipient's address each time.

Problem is, the output of the standard form mail reply script isn't exactly invisible, with the name of each field and then the content for that field, and various little messages saying "this is from a form".

Does anyone know of a free and easy script I could use to do this, where I could manually fill into the form the recipient, subject, and content, and have it send looking like a "normal" email with nothing added and the formatting maintained in the content, etc?

I'm still open to other ideas, too. It just has to be simple to set up and free or very cheap, as this is just a temporary need.

Thanks!

Bekariso (overcoming the devestating effects of email withdrawl just enough to engage brain and find a solution!)

------------------
www.LeafWind.com (http://www.LeafWind.com)
Growing web sites that thrive in the winds of change.

Deb
04-10-1999, 09:10 PM
I think, since you do not need it perm... it would be easier for you to use one of the free email places like mail.yahoo.com who will allow you to setup a few external pop accounts too...

http://www.aota.net/ubb/Forum1/HTML/000269.html (I can't keep up with you:P)

Deb

Justin
04-10-1999, 11:59 PM
In mail.html:

-------8<---------
<form action=mail.php method=post>
<input type=text name=subject>
<input type=text name=to>
<textarea name=message rows=10 cols=60></textarea>
<input type=submit value=Send>
</form>
-------8<-----------------

In mail.php:

------8<---------------
<?
mail($to,$subject,$message,"From: someone@leafwind.com\nReply-To: someone@leafwind.com")

print "
<html>
<head>
<center><h1>Thank you</h1></center>
To: $to
Subject: $subject
<blockquote>
Message:
<hr>
$message
<hr>
</blockquote>
</body>
</html>";
exit;
?>
------8<-----------------

That, my friends, is just one of the reasons I love php http://www.aota.net/ubb/smile.gif

------------------
Justin Nelson
FutureQuest Support

LeafWind
04-11-1999, 06:24 PM
Justin: thanks!

Okay, that looks cool enough and simple enough, I cut-and-pasted your examples into two new files mail.html and mail.php which I put in the same directory, and got this error message back:

Parse error: parse error in /big/dom/xleafwind/www/tempmailer/mail.php on line 4

when I clicked "Send" in mail.html. Perhaps I should go post about this in the php3 forum? Never been there, as I've never used php3 before . . .

Thanks for the idea, this would be perfect if I can fix whatever's causing the parse error.

http://www.aota.net/ubb/smile.gif

Bekariso

Justin
04-11-1999, 07:49 PM
hehe - Oops http://www.aota.net/ubb/smile.gif My mistake. Should be a semicolon after the mail line:

mail($to,$subject,$message,"From: someone@leafwind.com\nReply-To: someone@leafwind.com");

Sorry about that http://www.aota.net/ubb/smile.gif Hope this helps.


------------------
Justin Nelson
FutureQuest Support

LeafWind
04-12-1999, 05:04 PM
Woohoo!!!

It works! Wonderful! Very impressed! Thank you so very very much!

http://www.aota.net/ubb/biggrin.gif http://www.aota.net/ubb/smile.gif http://www.aota.net/ubb/wink.gif

Happy now,
Bekariso