CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
sub routine to email doesn't print all lines

 



Melissa
Deleted

Feb 17, 2000, 1:14 PM

Post #1 of 3 (335 views)
sub routine to email doesn't print all lines Can't Post

Arrrrrgggh!

I can't figure this one out. I've retyped, I've moved lines around and I've changed the names of the fields.

When the email is received, the first four lines (name, title, organization, address) are not at the top of the email. The information prints from another subroutine that puts it to a db, so I know it's not the fields. Well, I don't know that I guess! :-)

It starts with the commercial phone line. I can move the name, title, organization and address below and they print.

It seems the phone1 and phone2 HAVE TO BE at the top of the email.

Can anyone else see WHY??

sub send_email {
foreach (@mail_user) {
open(MAIL, "| mail $_");

print MAIL "Subject: DII COE Request for Service \n";
print MAIL "From: DII COE Web Site\n";

$fields{'comment_line'} =~ s/%0D%0A/\n/g;
#
print MAIL "Name: $fields{'name'}\n";
print MAIL "Title: $fields{'title'}\n";
print MAIL "Organization: $fields{'organization'}\n";
print MAIL "Address: $fields{'address'}\n";
print MAIL "Com Phone: $fields{'comph'}\n";
print MAIL "DSN Phone: $fields{'dsnph'}\n";
print MAIL "Fax: $fields{'fax'}\n\n";

print MAIL "Expectations/Objectives:\n";
print MAIL "\t$fields{'objective'}\n\n";

print MAIL "Type of System and Configuration Arrangement this Request Pertai
ns To:\n";
print MAIL "\t$fields{'type'}\n\n";

print MAIL "Current System/Program Status:\n";
print MAIL "\t$fields{'status'}\n\n";

print MAIL "Expected Time Frame of Services: $fields{'timeframe'}\n";
print MAIL "Type of Request: $fields{'request'}\n\n";

print MAIL "Which of the following services do you need assistance with?\n";

if ($fields{'technical'}) {
print MAIL "\t* DII COE Technical Support, Advice, and Recommendations\n";
print MAIL "\t on becoming DII COE Compliant\n";
}

if ($fields{'compliance'}) {
print MAIL "\t* DII COE Compliance Testing and Certification\n";
}

if ($fields{'integration'}) {
print MAIL "\t* Test Integration and Management\n";
}

if ($fields{'lab'}) {
print MAIL "\t* Use of existing Test Lab and Resources\n";
}

close (MAIL);
}

} #end send_email


Melissa
Deleted

Feb 17, 2000, 1:30 PM

Post #2 of 3 (335 views)
Re: sub routine to email doesn't print all lines [In reply to] Can't Post

I figured it out! But I don't know what difference it makes.

When I change this line:
print MAIL "Name: $fields{'name'}\n";

by removing the colon after the word Name, so I have this:
print MAIL "Name $fields{'name'}\n";

It works. Can anyone explain that to me?? I'll gladly post the entire script if someone wants to solve the puzzle!!


kencl
User

Feb 17, 2000, 1:59 PM

Post #3 of 3 (335 views)
Re: sub routine to email doesn't print all lines [In reply to] Can't Post

My guess is that it's because any entry with a colon refers to the header of the e-mail, not the body.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives