Re: Basic script to send mail details!
- From: noreply@xxxxxxxxx (Gunnar Hjalmarsson)
- Date: Sun, 22 Jun 2008 07:08:00 +0200
Francisco Valladolid wrote:
I'm writting a basic Perl script to send mail using the Mail::Send
module for it via CGI.pm
I have:
...
use CGI qw/:standard/;
print header,
start_html('Sending ...'):
$mail_to = param('email');
$msg = Mail::Send->new;
You can skip that line.
$msg = Mail::Send->new(Subject=>Some Subject', To=>$mail_to);
$msg->cc('some@xxxxxxxxxx');
... bla bla
Whenever, the script don't send the mail to the param get from the
email field in the form.
Are you sure that $mail_to was populated in accordance with your expectations? What if you simply print it?
Is correct interpolate the variable $mail_to or need put single quotes
o maybe double quotes?
You don't need any quotes around $mail_to.
Maybe you should post a _short_ but _complete_ script that illustrates the issue. If you do, please copy and paste; don't retype. Enable strictures and warnings, capture possible errors and let us know about the messages in the error log.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
.
- Follow-Ups:
- Re: Basic script to send mail details!
- From: Francisco Valladolid
- Re: Basic script to send mail details!
- References:
- Basic script to send mail details!
- From: Francisco Valladolid
- Basic script to send mail details!
- Prev by Date: Basic script to send mail details!
- Next by Date: Re: Basic script to send mail details!
- Previous by thread: Basic script to send mail details!
- Next by thread: Re: Basic script to send mail details!
- Index(es):
Relevant Pages
|