CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
email problem



Nov 30, 2000, 2:33 PM

Post #1 of 4 (299 views)
email problem Can't Post

my html line is this:

<INPUT type=checkbox name=mail value="send">email this?</INPUT>

my CGI code is this:

if ($mailChoice eq "send"){
print "<FORM action=\"mail.cgi\" method='post'>

To (email): <INPUT TYPE=TEXT NAME=\"to person\"></TEXT><BR>
From (name): <INPUT TYPE=TEXT NAME=\"from name\"></TEXT><BR>
From (email): <INPUT TYPE=TEXT NAME=\"from addr\"></TEXT><BR>
Subject: <INPUT TYPE=TEXT NAME=\"subject\"></TEXT><BR><BR>

<INPUT type=hidden name=\"message body\" value=\"$outLine\">

<INPUT type=submit value=\"send\">

I don't get any errors, but I never receive the email when I test it. Any ideas?

Enthusiast / Moderator

Nov 30, 2000, 3:40 PM

Post #2 of 4 (299 views)
Re: email problem [In reply to] Can't Post

I'm not too sure why you posted the html instead of the code in mail.cgi, your problem lies there. Html isn't the culprat this time. You'll find this thread helpful for sending email.

Specifically see the posts be "Cure".



Dec 1, 2000, 9:14 AM

Post #3 of 4 (299 views)
Re: email problem [In reply to] Can't Post

you were right, when I ran it simply as an html file it worked; however, my problem remains. I was returning the html from my cgi program because I was inserting a cgi-generated string (i.e. $outLine) in the body of the email.

I guess I can't see why I can't do it from cgi as I'm simply returning an html page; shouldn't the email work the same whether the page was generated by cgi or not?

The way I want it to work is this: on the first web page the user types a string into an input form and then selects the "I want to send email" checkbox. The user then clicks on the "encode" button, whereby they are then presented with a cgi-generated page which contains email input fields (these don't appear if the "I want to send email" checkbox wasn't checked); also on this page is the text they had previously entered, although now it has been transformed into an encrypted string. When the user enters the necessary information into the email input fields and clicks on "send" this encrypted string is emailed to the recipient.

The long and short of it is that if I can't handle the email code within my cgi program then I don't see how to:
1) selectively display the email input fields based on the value of the "I want to send email" checkbox.
2) include the (cgi-generated) encrypted string as the body of the message.

Are there other ways to solve these problems?


Dec 1, 2000, 4:07 PM

Post #4 of 4 (299 views)
Re: email problem [In reply to] Can't Post

I got it to work with the above approach.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives