I'm borrowing some PHP code to make a conference registration webpage. The code has a function that sends an email to me (the administrator) when there is a "problem". That one seems to be working fine and has mailed me many times.
function mail_admin($page, $error){
$to = 'myvalid@emailaddress.com';
$subject = 'error on MUD Registration website, page '.$page;
$message = 'The specific error message is '. $error."\n\n";
$message.= 'Date: '.date('m-j-y')."\n\n";
$headers = 'From: anothervalidemail@forme.com';
mail($to, $subject, $message, $headers);
}
I have another routine that gets called with a somewhat long message-body passed to it. The actual mail() call is failing and the routine is always returning false. My questions follow the routine:
function send_success_email($email, $email_message){
$to = $email;
$subject = 'MUD Registration 2007';
$message = 'Date: '.date('n-j-y')."\n";
$message.= $email_message;
$headers = 'From: myvalid@emailaddy.com';
if(mail($to, $subject, $message, $headers)){
return true;
}else{
return false;
}
}
Will my mail program be sensitive to long lines? How about numbers of lines? Do I have to be fastidious about clipping line lengths to a certain length?
Yes, I'm working on commenting out lines of the complex message to see where the problem is.
Seeking your thoughts? Thanks in advance
W9FZ