Jump to content

[SOLVED] html cron email help


dadamssg

Recommended Posts

im running a cron and getting the email sent to me....but i'm trying to insert line breaks, so i insert the <br> tags..but i just get sent the literal "<br>" with no line breaks. How do i fix this?

 

heres part of my little cron script to delete certain images

$filelist = glob("*.png");//list all files
$count = count($filelist);
echo $count." Images<br><br>";
   foreach( $filelist as $file) {
     echo $file;
 echo "<br>";
 $number = grabNumbers($file);

 if($number < $now)
 {
 echo "DELETED!";
 unlink($file);
 }else{
 echo "Still good.";
 }
 echo "<br><br>";
   }

Link to comment
https://forums.phpfreaks.com/topic/167076-solved-html-cron-email-help/
Share on other sites

Well, are you sending the email as the correct MIME type to support HTML?  You didn't show any mail() code.

 

Otherwise, you should probably use your system appropriate version of "newline" which might be something like "\n" or "\r" or a combination... or neither?

my hosting service runs the cron then sends the email....heres my exact email

 

 

X-Powered-By: PHP/5.2.8

Content-type: text/html

 

11 Images<br><br>1248324900LAdmin456.png<br>Still good.<br><br>1248372000LAdmin469.png<br>Still good.<br><br>1248411600LJordo49600.png<br>Still good.<br><br>1248497700LAdmin457.png<br>Still good.<br><br>1248505200LAdmin606.png<br>Still good.<br><br>1248825600LJordo49610.png<br>Still good.<br><br>1248840000Admin614.png<br>Still good.<br><br>1248840000LAdmin614.png<br>Still good.<br><br>1248937200LAdmin607.png<br>Still good.<br><br>1249441200LAgile35612.png<br>Still good.<br><br>1252274400LAgile35603.png<br>Still good.<br><br>1248322020<br>Jul 22, 2009    11:07 pm

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.