Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing header info to email with Perl

Status
Not open for further replies.

SigmaNuEK

MIS
Joined
Jun 22, 2001
Messages
1
Location
US
I am new to Perl and have successfully built a program that that takes Form inputs and sends a receipt page to the screen in HTML and an email to the Marketing dept at the company, with all the form inputs from the user. What I need help in is how to get all the header info like IP address and host name( which most of the time will be blank) and others into the email also so the Marketing dept can track who has filled out the form. Any help would be great. Thanks
 
You could use your environment variables like so:

[tt]
foreach $env_var (keys %ENV) {
print "$env_var is set to $ENV{$env_var}";
}
[/tt]

That will print them all out to the screen.

If you want to email them, then just wrap that code in the code that emails the info.


Hope this helps.
-Vic vic cherubini
krs-one@cnunited.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash
====
 
I would modify that code to:
Code:
foreach $env_var (keys %ENV) {
   print &quot;$env_var is set to $ENV{$env_var}<br>\n&quot;;
}
Otherwise all the text will get strung together into a single line.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top