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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Email Address in Perl??

 



gareth-owen
Deleted

Apr 8, 2000, 12:52 PM

Post #1 of 4 (578 views)
Email Address in Perl?? Can't Post

I'm sorry if I'm perstering you lot today... but... my last quetion commeth...

I did post this earlier, and the reply someone sent me didn't work (or I was just too stupid to get it to work... most likely!)

At the moment using the FormMail script (Matt's Script Archive), I have to place :

<input type="hidden" name="recipient" value="me@domain.com"> in the html...

I really need to have this hidden away in the Perl script, and not the html... how would I do this?

I was told to put this in an 'array', but the array they gave me didn't work at all, ang kept giving me an 'internal server error'

Thanks loads,

Gareth...


lsommerer
Deleted

Apr 8, 2000, 6:03 PM

Post #2 of 4 (578 views)
Re: Email Address in Perl?? [In reply to] Can't Post

While this is not the "best" approach, the most straight forward would be to replace this line:
<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>


print MAIL "To: $Config{'recipient'}\n";
</pre><HR></BLOCKQUOTE>
with this line:
<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>


print MAIL "To: you@your.address\n";
</pre><HR></BLOCKQUOTE>
Where "you@your.address" is your actual address.

I'd also add comments near the top of the script to remind yourself that this copy of the script sends email to that address no matter what is sent to the script.

Lloyd Sommerer



Cure
User

Apr 8, 2000, 6:47 PM

Post #3 of 4 (578 views)
Re: Email Address in Perl?? [In reply to] Can't Post

 
You will get a error if you do this-> print MAIL "To: you@your.address\n";

you need to escape it.

print MAIL "To: you\@your.address\n";

Cure


gareth-owen
Deleted

Apr 9, 2000, 8:07 AM

Post #4 of 4 (578 views)
Re: Email Address in Perl?? [In reply to] Can't Post

Maximum thanks to both of you!

I'll do it now...

Thanks again,

Gareth...

 
 


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

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