dadamssg Posted July 23, 2009 Share Posted July 23, 2009 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 More sharing options...
xtopolis Posted July 23, 2009 Share Posted July 23, 2009 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? Link to comment https://forums.phpfreaks.com/topic/167076-solved-html-cron-email-help/#findComment-880946 Share on other sites More sharing options...
dadamssg Posted July 23, 2009 Author Share Posted July 23, 2009 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 Link to comment https://forums.phpfreaks.com/topic/167076-solved-html-cron-email-help/#findComment-880948 Share on other sites More sharing options...
kenrbnsn Posted July 23, 2009 Share Posted July 23, 2009 Why are you trying to send HTML email, just use text: <?php echo "\n"; ?> will insert a line break into the email message. Ken Link to comment https://forums.phpfreaks.com/topic/167076-solved-html-cron-email-help/#findComment-880950 Share on other sites More sharing options...
dadamssg Posted July 23, 2009 Author Share Posted July 23, 2009 that did the trick, thank you! Link to comment https://forums.phpfreaks.com/topic/167076-solved-html-cron-email-help/#findComment-880951 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.