Your line:
<<END_OF_MESSAGE;

should just be:
END_OF_MESSAGE

(When you use $smtp->datasend (<<END_OF_MESSAGE);, the << is part of the 
command, not part of the identifier. And you don't need a semicolon at the 
end of the structure -- called a 'here document' -- because this is all 
effectively just one command which is terminated by the semicolon at the 
end of $smtp->datasend (<<END_OF_MESSAGE);.)

best,

Mo

At 04:35 09/04/02, you wrote:
>Dear friends,
>
>Can anybody help me? I have written the script for tell a friend. Which I 
>wanted to incorporate in the site. It is showing error, but I am unable to 
>trap the error.The error message I am getting is "Can't find string 
>terminator "END_OF_MESSAGE" anywhere before EOF at referafriend.pl"
>
>The script is
>********************************************************
># Path to perl with shebang symbol
>#!/perl5/bin/MSwin32-x86
>
># SCRIPT FOR - TELL A FRIEND
>use CGI;
>
># USING SIMPLE MAIL TRANSMISSION PROTOCOL
>Use Net::SMTP;
>$q=new CGI;
>
># ASSIGNING THE VALUES USING MY
>my $smtp_host='xyz.com';
>
># USER NAME AND EMAIL ID
>my $from_name=$q->param('from_name');
>my $from_email=$q->param('from_email');
>
># FRIEND NAME AND EMAIL ID
>my $friend_name=$q->param('friend_name');
>my $friend_email=$q->param('friend_email');
>
># SUBJECT
>my $subject="Log on to the site today!";
>my $smtp=Net::SMTP->new($smtp_host, Timeout=>30);
>
># SMTP -> SIMPLE MAIL TRANSMISSION PROTOCOL
>$smtp->mail($email);
>$smtp->to($friendemail);
>$smtp->data();
>$smtp->datasend (<<END_OF_MESSAGE);
>From:$from_email
>To:$friend_email
>Subject:$subject
>
># message to friend
>Dear $friend,
>Hi, I am referring a site http://www.xyz.com.
>
>They are into webdesign, hosting and developement.
>Thanks!
>$from_name
><<END_OF_MESSAGE;
>$smtp->dataend();
>$smtp->quit;
># open html & print title
>print $q->header(-Refresh=>"15; URL=http://www.infostan.com";);
>print $q->start_html(-title=>'Tell a Friend' -BGCOLOR=>'white);
># printing the message
>print "</centre>Dear $name<br>
>Thanks for referring (http://www.xyz.com) us to your friend! We appreciate it!
>Thanks again! Have a great day!
></centre>";
># end of html
>print $q->end_html;
>********************************************************
>
>Thanks in advance,
>Satheesh Padmanabhan.
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]



Mo Holkar
Undying King Games
[EMAIL PROTECTED]
Free games! at http://www.ukg.co.uk


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to