Andrew Stevens wrote:
> Try: 
> 
> $smtp->datasend("To: $formdata{'email1'}\n, $formdata{'email2'}\n");
> 
> with \n after each email address.
> 
> Andy

I seriously doubt this would work. Unless the following line starts 
with a tab a newline ENDs a header. In this case your code would 
produce incorrect headers. But since Net::SMTP doesn't use the 
headers you specify in datasend() you would only confuse filters 
and maybe the recipients mail client.

I think you meant

$smtp->datasend("To: $formdata{'email1'}\n\t, $formdata{'email2'}\n");

> From: "andy" <[EMAIL PROTECTED]>
> this is probably a stupid syntax question, but i'm using the following
> code to send mail:
> 
> use Net::SMTP;
> $smtp = Net::SMTP->new('$server');
> $smtp->mail($ENV{USER});
> $smtp->to("$formdata{'email'}");
> $smtp->data();
> $smtp->datasend("To: $formdata{'email'}\n");

Look at the line above and the one two lines above!

You see, there are two places on which you specify the recipient.
And actualy the first one is more important. The second only specifies what will be 
seen in the mail headers, which doeasn't actualy have to be a mail address at all.

You have to add the other address to the ->to() method ass well:

$smtp->to( $formdata{'email1'}, $formdata{'email2'});

HTH, Jenda

== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
: What do people think?
What, do people think?  :-)
             -- Larry Wall in <[EMAIL PROTECTED]>
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to