Re: Mail::Send question
On Friday, August 1, 2003, at 11:09 PM, Wiggins d'Anconia wrote: Camilo Gonzalez wrote: Wiggins d'Anconia wrote: Scot Robnett wrote: Is there any way to force Mail::Send to accept a "From" name, as opposed to simply sending and using the hostname by default? I don't see anything in the docs about setting the "From" field in the headers. (of course, I can just open a pipe to sendmail, but I want to see if there's a way to pull this off first...) Definitely avoid this if possible, there are numerous mail message modules, one of them is bound to provide what you need. Why is sendmail held in such low regard by this group? Sendmail itself most of this group will hold in very high regard, as I do. It is the method by which it is invoked that is not held in high regard. A mail message is a very complex beast, and getting more complex by the day, and most programmers don't know enough about it to construct a message properly, and they shouldn't, why bother when there are so many well designed and properly coded modules available that will do it for you. On top of that sendmail is not necessarily on every system or running on all systems, so by allowing code to use a module it is more likely to be portable to different systems, etc. On top of all of this sendmail itself is incredibly complex and most people do not know how to properly invoke it, etc. In most cases sendmail probably provides the mechanism for actually transferring the message however the details can be hidden from the programmer by a module, which makes his life much easier. It is this same reasoning why the CGI module should be used rather than parsing an HTTP request directly, parsing query strings or cookies, etc. Just use the Perl Sendmail module: http://search.cpan.org/dist/Mail-Sendmail/Sendmail.pm It will run on any platform. After all, if I can understand it, anybody can. Gregg Allen http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Regex and Email address.
I'm not clear on what you're trying to do. I recommend reading "Mastering Regular Expressions" by O'Reilly press. http://www.oreilly.com/catalog/regex/ I am currently reading it. I am not associated with O'Reilly press, I assure you. ;-) Gregg Allen Blessed are they who expect nothing, for they shall not be disappointed. Nietsche On Wednesday, August 6, 2003, at 09:25 PM, Sara wrote: $recipient_email = [EMAIL PROTECTED]; When you send email using yahoo groups, it will show the recpient mail address after sending mail like this... Mail successfully sent to [EMAIL PROTECTED] anybody can help me how to do it? that it will hide the domain except for showing one character after @. I know I am poor at Regex (too poor). Thanks for any input. Sara. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding a comma to format localtime
All, I use this line of code: my $datetime = join ' ', (split ' ', localtime)[0,2,1,4,3]; To create this result: Mon 9 Apr 2007 09:15:05 How can I add a comma to this result to get: Mon, 9 Apr 2007 09:15:05 Best and thanks, Gregg - Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
Re: Net::FTP
If you don't mind escaping to the shell, this is how I get a list of files I want to ftp. #This returns a list of files to be ftp'ed my $files = `ls`; #turn the files variable into an array of file names. my @ftpfiles = split(/\n/ , $files); Sincerely, Gregg R. Allen I.T. Specialist Lexington Law Firm On Thursday, Jul 10, 2003, at 04:13 US/Mountain, Sara wrote: #!/usr/bin/perl -w use strict; use warnings; use CGI::Carp 'fatalsToBrowser'; use CGI qw/:standard/; use Net::FTP; my $ftp = Net::FTP->new("ftp.yourserver.com", Debug => 0) or die "Cannot connect to some.host.name: $@"; $ftp->login("username",'password') or die "Cannot login ", $ftp->message; $ftp->cwd("/") or die "Cannot change working directory ", $ftp->message; my @Directory = $ftp->dir("/path/to/directory"); print "@Directory"; $ftp->quit; I am using the following to login to remote FTP; and its working fine and I am getting the list of files from remote FTP from my desired directory but; - The script is working fine in my Window IDE and giving an Internal Server Error (without any error message) while on my Host. - its returning @Directory in long format "-rw-r--r-- 1 username username 8654 Jul 5 18:20 test.html" Is it possible to get file names only like test.html and how to provide $Directory in the script given below because above is an array context @Directory? because after getting the list of files from the directory above I want to match/compare the file names with a text list on my server, see below. ### $my Directory = "."; if ( open( NO, 'data.txt' ) ) { while ( ) { chomp; # Optional: Add check for blank/incomplete lines. if ( -f "$Directory/$_" ) { print "File '$_' exists in '$Directory'.\n"; # Optional: Add file to 'exists' list for later reporting. } else { print "File '$_' does NOT exist in '$Directory'.\n"; # Optional: Add file to 'not exists' list for later reporting. } } close( NO ); } else { print "ERROR: Unable to open file: $!\n"; } Thanks, SARA. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]