Sending attachments in perl

2004-07-08 Thread Werner Otto
Hi All, I am having a problem sending mail with Net::SMTP. Does this module support attachements at all? I know that MIME::Lite supports attachments, but I dont have it installed. And I also don't have privilages to install it. I need another alternative. Any ideas? Regards Otto* * -- To

Mailing Script

2004-07-08 Thread Werner Otto
Hi All, I have this script mentioned below. When I run it from command line: perl test.cgi all works as it should. When I run it from my browser it only writes the file displays the confirmation, but does NOT email my files. From command line everything works. #!/usr/bin/perl use CGI

Re: Mailing Script

2004-07-08 Thread Werner Otto
Gunnar Hjalmarsson wrote: Werner Otto wrote: I have this script mentioned below. When I run it from command line: perl test.cgi all works as it should. When I run it from my browser it only writes the file displays the confirmation, but does NOT email my files. snip my $my_file_gif = 'logo.gif

Re: Mailing Script

2004-07-08 Thread Werner Otto
Gunnar Hjalmarsson wrote: Werner Otto wrote: I would try changing those to full paths. It's not advisable to rely on an assumption about the working directory. Optionally you can set the working directory with the chdir() function. I have changed the path to the full path concerning the files

Re: Mailing Script

2004-07-08 Thread Werner Otto
Gunnar Hjalmarsson wrote: Werner Otto wrote: Gunnar Hjalmarsson wrote: If you don't get any error messages, another theory is that it has something to do with the configuration of the mail server. You could for instance try to change my $mail_host = 'smtp.dcs.kcl.ac.uk'; to my $mail_host

Re: Mailing Script

2004-07-08 Thread Werner Otto
Gunnar Hjalmarsson wrote: Werner Otto wrote: I've tried to change to localhost , no go... Okay. Add this line at the top of the script: use CGI::Carp 'fatalsToBrowser'; Change this line: $msg-send; to $msg-send or die Error sending msg: $!; Thank you, you are a Genius

Re: Mailing Script

2004-07-08 Thread Werner Otto
Gunnar Hjalmarsson wrote: Werner Otto wrote: Gunnar Hjalmarsson wrote: Add this line at the top of the script: use CGI::Carp 'fatalsToBrowser'; The permissions on running.pdf was not correct. It helps if you know how to debug! Talking about debugging... You should get the habit of including

Re: Mailing Script

2004-07-08 Thread Werner Otto
Wiggins d Anconia wrote: Gunnar Hjalmarsson wrote: Werner Otto wrote: Gunnar Hjalmarsson wrote: Add this line at the top of the script: use CGI::Carp 'fatalsToBrowser'; The permissions on running.pdf was not correct. It helps if you know how to debug

Re: Mailing Script

2004-07-08 Thread Werner Otto
Randal L. Schwartz wrote: Werner == Werner Otto [EMAIL PROTECTED] writes: Werner $surname = param(surname); Werner $name= param(forename); Werner $email = param(email); I'm not sure what the rest of the script does, but if you put this on a form and then send email

popup_menu

2004-06-25 Thread Werner Otto
Hi have the following code: print popup_menu(-name='hosts',-values=['1','2','3'],-default=['2']); the default value doen not seem to appear, any reason why? Regards Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

popup_menu

2004-06-24 Thread Werner Otto
Hi All, Any idea how to disable a popup_menu? Regards Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

popup_menu item select

2004-06-18 Thread Werner Otto
Hi All, When I select an item in a popup_menu it needs to print Hello. In other word how do I get the name param from the popup_menu by selecting a value only and not by posting in the form of a submit button. Any help would be appreciated -- Kind Regards, Werner Otto -- To unsubscribe, e-mail

Can't coerce array into hash at - error

2004-06-17 Thread Werner Otto
,'labels'=\%hostname); print /tr; print /table/center; -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Checkbox_group

2004-06-16 Thread Werner Otto
=[$hostname,$hostip]),; But I don't want $hostip's value to appear on the form, it should be available when I request the param though. Any ideas? -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http

Posting hyperlink value

2004-06-15 Thread Werner Otto
Hi All, mit.cgi file: I have a hyperlink defined as: a href=host.cgi name=$hostname value=$hostname$hostname/a in a form. The $hostname values are retrieved from the mysql database in a fetch() loop. My code in host.cgi: #!/usr/bin/perl use CGI qw(:standard); print Content-type: text/html\n\n;

Link

2004-06-14 Thread Werner Otto
Hi all, I have form that is made up of records retrieved from a database. The first column presents the information as a hyperlink. I need to be able to keep a record on which one of the multiple hyperlinks where clicked. Based upon the selected link I need to pass the value to the next CGI and

Re: Link

2004-06-14 Thread Werner Otto
On Mon, 14 Jun 2004 13:46:04 +0200, Ash Singh [EMAIL PROTECTED] wrote: -Original Message- From: Werner Otto [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 1:25 PM To: [EMAIL PROTECTED] Subject: Link Hi all, I have form that is made up of records retrieved from a database. The first

use CGI qw(:standard);

2004-06-14 Thread Werner Otto
When using this module and Im printing out a checkbox group: print checkbox_group(-name='hdel',-values=[$hostname]),; is there a way to sneak through a hidden value $hostip in there somehow aswell? -- Kind Regards, Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

use CGI qw(:standard);

2004-06-11 Thread Werner Otto
Hi, I am making use of use CGI qw(:standard); to create my form. I need to amend the size of a submit button and need to tell the button which script to call (ie. action=test.cgi). Where can I find documentation on all the attributes of the components, or an example for my two queries would be

Current Value

2004-06-10 Thread Werner Otto
Hi, When Im looping through as cgi that loops through records in a table, I do a print statement of a variable. Example if($condition eq G) { print $field1; } why does it print all the occurances of the fields in the table, as only one of them fits the criteria of equaling G. Is there some

Calling of subs

2004-05-25 Thread Werner Otto
hi there, how do i call a subroutine from one cgi to another? Regards Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Requireing a specific sub

2004-05-25 Thread Werner Otto
Hi there, Is there any way that I can call a specific sub from a cgi script. i.e. script1.cgi sub print1 { print hello1; } sub print2 { print hello2; } script2.cgi my messy code: require(/home/user/public_html/script1.cgi.script2()); obviously this does not compile. But the results needed when

Re: Requireing a specific sub

2004-05-25 Thread Werner Otto
; connect_db(); The error is: Undefined subroutine main::connect_db called at mit.cgi line 8. any ideas? On Tue, 25 May 2004 13:36:34 +0200, Jan Eden [EMAIL PROTECTED] wrote: Werner Otto wrote on 25.05.2004: Im lost, could you give me an example, please... Please cc the list... On Tue, 25 May 2004 13:13

Network Monitoring

2004-05-20 Thread Werner Otto
Hi there, This is a slighly of the topic post, but has a relation to perl. My company is looking for a network monitoring system with functionality that allows us to see that all connections to our servers are up and running and to keep track of the kb/s and response time. Yes, this sounds

String Variable

2004-05-20 Thread Werner Otto
hi there, I've got the following example: system (ping -a $hostname | cut -c20-30); how do I get the following result which is (is alive) into a string variable as I keep on getting 0 Please help. Regards Werner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Displaying another page

2004-05-17 Thread Werner Otto
Hi there, I have the following situation where I need to call a html page depending on. if($name eq ) { call/display my html page. } Can anyone help me out with the syntax for that one line please. -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Network Traffic Monitoring

2004-05-17 Thread Werner Otto
Hi there, Does anyone know of a good, and good looking network monitoring open source web based application? Something that includes kb/s and response time. And of course can be viewed in a web-page format(graphs). Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED

Data encryption

2004-05-14 Thread Werner
that I make sure these details are not seen or to be encrypted in some way? Kind Regards Werner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Post Method

2004-05-14 Thread Werner
Werner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Browsers?

2004-05-14 Thread Werner Otto
Is there any way in which I can make my site appear the same in all available browsers? -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Switch

2004-05-13 Thread Werner Otto
Is there some kind of a swtich statement in perl? -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response