Easy question

Hello, I want to print the following sentence using the print command.
Http://www.postbank.nl?test&test2
I already tried:
print "http://www.postbank.nl?test&test2" but that didn't work.
Help me out please.
quickbasicAsked:
Who is Participating?
 
guadalupeConnect With a Mentor Commented:
First make sure your mail is a fully formatted html page.  Next use this subtitution on the html:

            #Change "=" To  "=3D" for HTML formatted mail
            $html =~ s/=/=3D/g;

This is necessary for maiul progs.  Don't know why.  Then use this format:


sub send_email($$$$$)
{

my($hostname,$address,$from_name,$from_address,$subject,$body) = @_;
#
# Connect to SMTP server.
#
$mailserv = new Net::SMTP($hostname, Debug => 1,);

unless ( $mailserv ) {
      &ErrorLog( "Could not connect to mail server $hostname; $!\n", $LOG_FILE );
}


#
# Format message.
#
$data = <<END;
From: "$from_name" <$from_address>
To: <$address>
Subject: $subject
MIME-Version: 1.0
Content-Type: multipart/alternative;
      boundary="----=_NextPart_000_000F_01BF381C.C17D0920"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3

This is a multi-part message in MIME format.

------=_NextPart_000_000F_01BF381C.C17D0920
Content-Type: text/plain;
      charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Plain Text

------=_NextPart_000_000F_01BF381C.C17D0920
Content-Type: text/html;
      charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

$body

END


#
# Send the message.
#
$mailserv->mail( $from_address );
$mailserv->to( $address );
$mailserv->data( $data );


#
# Close connection.
$mailserv->quit();

# smtp.pl
}


Where $body is the edited html page and Plain text is the plain text version of your mail for non html compliant mail progs...Not such an easy question after all.

0
 
guadalupeCommented:
Could it be that you forgot the ";"

print "http://www.postbank.nl?test&test2";
0
 
maneshrCommented:
are you sure?? what does it print? or does it give you an error message?

did you put a ; at the end of the print statement??

i tried the foll and it works!!

#!/usr/local/bin/perl

print "http://www.postbank.nl?test&test2";
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
guadalupeCommented:
You understand that when this gets to the screeen/browser it will be not be a link and it will not redirect the browser to this link?
0
 
quickbasicAuthor Commented:
Well, actually i wan't to write an e-mail script that sends me an e-mail which includes the mentioned url in the message body. I'm getting the e-mail but the url is mixed-up. Can anyone tell me what lines of code i need ?
0
 
quickbasicAuthor Commented:
Ps. for an example see the February newsletter from expert-exchange...
0
 
ozoCommented:
What are you getting in the email?
0
 
maneshrCommented:
try escaping the "Sp" chars in the URL

Eg.

print "http:\/\/www.postbank.nl\?test&test2";
0
All Courses

From novice to tech pro — start learning today.