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 unsubs

Re: Sending attachments in perl

2004-07-08 Thread Gunnar Hjalmarsson
Werner Otto wrote: 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. Assuming that you have privileges to run your own Perl programs, that's most likely a misconception. Please see this message:

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 qw(:stan

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
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. my $my_file_gif = 'logo.gif'; my $my_file_zip = 'running.pdf'

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. my $my_file_gif = 'logo.gif'; my

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
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 attachments. Still it doesn't

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 att

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
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 = 'localhost'; I can't see t

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 Gunnar Hjalmarsson
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: $!"; -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/co

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... Th

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
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: use strict; use warn

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 Wiggins d Anconia
> 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
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! Tal

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
Werner Otto wrote: When I include warnings and strict is give me allot of warnings. They are not warnings, they are fatal errors. What do they mean? They mean that you are using variables without declaring them first. You should not take those error messages too literally. If you did, you'd end u

Re: Mailing Script

2004-07-08 Thread Wiggins d Anconia
> Wiggins d Anconia wrote: > > > > > > When I include warnings and strict is give me allot of warnings. What do > they mean? > > Software error: > Global symbol "$surname" requires explicit package name > at ola.cgi line 15. > ola.cgi had compilation errors. > > > For help, please sen

Re: Mailing Script

2004-07-08 Thread Randal L. Schwartz
> "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 to that address, you will incur

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 t

Re: Mailing Script

2004-07-08 Thread Randal L. Schwartz
> "Werner" == Werner Otto <[EMAIL PROTECTED]> writes: >> Do *not* send email to addresses taken from forms. Ever. >> >> Werner> why is that? Because you have no authentication of the requestor. Any fool can go to your website, enter [EMAIL PROTECTED], and all of a sudden, I get a big PDF

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
Randal L. Schwartz wrote: Werner Otto writes: Randal L. Schwartz wrote: Do *not* send email to addresses taken from forms. Ever. why is that? Because you have no authentication of the requestor. Any fool can go to your website, enter [EMAIL PROTECTED], and all of a sudden, I get a big PDF shoved

Re: Mailing Script

2004-07-08 Thread Camilo Gonzalez
Gunnar Hjalmarsson wrote: Randal L. Schwartz wrote: Werner Otto writes: Randal L. Schwartz wrote: Do *not* send email to addresses taken from forms. Ever. why is that? Because you have no authentication of the requestor. Any fool can go to your website, enter [EMAIL PROTECTED], and all of a sud

Re: Mailing Script

2004-07-08 Thread Randal L. Schwartz
> "Camilo" == Camilo Gonzalez <[EMAIL PROTECTED]> writes: Camilo> It may behoove you to send a confirmation email with a link Camilo> that when clicked will opt in a user. This "double opt-in" Camilo> procedure has become standard operating procedure for Camilo> considerate marketers and an i

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
Camilo Gonzalez wrote: Gunnar Hjalmarsson wrote: I think you are exaggerating, Randal. How much convenience are you ready to sacrifice in order to fight possible abusers? If you want to contact me privately, you can click the link below. If you fill the form, including your own email address, and s

Re: Mailing Script

2004-07-08 Thread Brad Lhotsky
Actually, it wasn't too long ago that someone posted a message here saying "HELP Spammers have been using my cgi mailer to mass people and my ISP is threatening to shut me down!". When dealing with email.. always taint check and sanitize data. Never allow someone to post the "To" or "Cc" address,

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
Brad Lhotsky wrote: Gunnar Hjalmarsson wrote: If you want to contact me privately, you can click the link below. If you fill the form, including your own email address, and submit it, you'll receive a copy of the message. That's for your record, for your convenience. Personally I think that makes s