Hi,
I have given my code below. I tried to remove the trailing spaces in the message field using regular expression but couldn't succeed. Can you suggest how to go about?
Any help will be appreciated.
$pop = new Mail:OP3Client( USER=>"User name",
PASSWORD=>"Pass",
Host=>"Host Name"
for ($i = 1; $i <= $pop->Count(); $i++)
{
foreach ( $pop->Head( $i ) )
{
$fromaddress = $1 if /From:\s(.+)/;
$replyto = $1 if /To:\s(.+)/;
$subject = $1 if /Subject:\s(.+)/;
}
$message=$pop->Body($i);
}
Thanks
Sincerely,
RCSEN
I have given my code below. I tried to remove the trailing spaces in the message field using regular expression but couldn't succeed. Can you suggest how to go about?
Any help will be appreciated.
$pop = new Mail:OP3Client( USER=>"User name",
PASSWORD=>"Pass",
Host=>"Host Name"
for ($i = 1; $i <= $pop->Count(); $i++)
{
foreach ( $pop->Head( $i ) )
{
$fromaddress = $1 if /From:\s(.+)/;
$replyto = $1 if /To:\s(.+)/;
$subject = $1 if /Subject:\s(.+)/;
}
$message=$pop->Body($i);
}
Thanks
Sincerely,
RCSEN