Dear Mr. Brain Thanks for your immediate response. I tried with what you have suggested. But it is still giving error message as "can't find string terminator "'" anywhere before EOF at friend.pl line 51". Can you please suggest me what I have to do?
******************************************************** # 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='infostan.com'; # USER NAME AND EMAIL ID my $from_name=$q->param('from_name'); my $from_email=$q->param('from_email'); # Assigning blank line my $BlankLine = "\n"; # 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(); $myBlankLine = "\n"; $smtp->datasend(<<END_OF_MESSAGE); From:$from_email To:$friend_email Subject:$subject $myBlankLine # message to friend Dear $friend, Hi, I am referring a site http://www.xyz.com. $myBlankLine 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.google.com"); print $q->start_html(-title=>'Tell a Friend' -BGCOLOR=>'white); # printing the message print "</centre>Dear $name<br> Thanks for referring us to your friend! We appreciate it! Thanks again! Have a great day! </centre>"; # end of html print $q->end_html; ******************************************************** Good Day! Satheesh On Tue, 09 Apr 2002 Brian Smith wrote : >I've had that one ... it is quite simple when you break it down >.... look at >your code > > > $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; > >""Can't find string terminator "END_OF_MESSAGE" anywhere before >EOF at referafriend.pl"" > >The first blank line that you encounter is actually the EOF. >What you need >to do is eliminate them. What you can try >is have this ... > >You will also need to fix you "END_OF_MESSAGE" Get rid of the >semi colon, >and the two greater then signs. > >$myBlankLine = "\n"; >$smtp->datasend (<<END_OF_MESSAGE); > From:$from_email >To:$friend_email >Subject:$subject >$myBlankLine ># message to friend >Dear $friend, >Hi, I am referring a site http://www.xyz.com. >$myBlankLine >They are into webdesign, hosting and developement. >Thanks! >$from_name >END_OF_MESSAGE > >Have a good night, > >Brian. > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]