php echo email
问题背景:我想输出一个表格,并且把这个表格作为内容发email出去。$message = '<table><tr><td><p>'; $message.= 'Driver: '; $message.= $firstName.' '.$lastName; $message.= '</p></td></tr><tr><td><p>Date:'.$orderTime.'</p></td></tr></table><table><tr><td><p>No: 1</p></td><td><p>Car'.$truck.':'.' '.$licNum; $message.= '</p></td></tr><tr><td><p>Kund:'.$customerName.'</p></td><td><p>Order:'.$orderNum.'</p></td></tr><tr><td><p>'; $message.= 'Book number:'.$bookNumPick.'</p></td><td><p>Produktnamn:'.$productName.'</p></td></tr><tr><td><p>Chassi:'; $message.= $tankName.'</p></td><td><p>Tank number:'.$chassi.'</p></td></tr><tr><td><p>Place:'.$locationPick.'</p></td><td><p>Place 2:'; $message.= $portCodePick.'</p></td> </tr><tr><td><p>Place 3:'.$locationUnload.'</p></td><td><p>Place 4:'; $message.= $timeUnload.'</p></td></tr><tr><td><p>Place 5:'.$ADRclass.'</p></td><td><p>Place 5:'.$weight.'</p></td></tr><tr><td><p>Place 6:'; $message.= $locationLoad.'</p></td><td><p>Place 7:'.$loadTime.'</p></td></tr><tr><td colspan="2"><p>Place 8:'; $message.= '</p></td></tr><tr><td colspan="2"><p>'.$info.'</p></td></tr><tr><td><p>Place 9:'.$outE.'</p></td><td><p>Place 10:'.$bookNumOut.'</p></td></tr><tr> <td><p>Place 11:'; $message.= $portCodeOut.'</p></td><td></td></tr></table>'; echo $message."<br>"; $to = $email; $subject = "Task"; $from = EMAIL; $headers = "From: $from"; echo $headers."<br>"; mail($to,$subject,$message,$headers);
。。。。(当中省略,可见$message)。。。。。 |
问题背景:我想输出一个表格,并且把这个表格作为内容发email出去。
问题:先上代码,
$message = '<table><tr><td><p>'; $message.= 'Driver: '; $message.= $firstName.' '.$lastName; $message.= '</p></td></tr><tr><td><p>Date:'.$orderTime.'</p></td></tr></table><table><tr><td><p>No: 1</p></td><td><p>Car'.$truck.':'.' '.$licNum; $message.= '</p></td></tr><tr><td><p>Kund:'.$customerName.'</p></td><td><p>Order:'.$orderNum.'</p></td></tr><tr><td><p>'; $message.= 'Book number:'.$bookNumPick.'</p></td><td><p>Produktnamn:'.$productName.'</p></td></tr><tr><td><p>Chassi:'; $message.= $tankName.'</p></td><td><p>Tank number:'.$chassi.'</p></td></tr><tr><td><p>Place:'.$locationPick.'</p></td><td><p>Place 2:'; $message.= $portCodePick.'</p></td> </tr><tr><td><p>Place 3:'.$locationUnload.'</p></td><td><p>Place 4:'; $message.= $timeUnload.'</p></td></tr><tr><td><p>Place 5:'.$ADRclass.'</p></td><td><p>Place 5:'.$weight.'</p></td></tr><tr><td><p>Place 6:'; $message.= $locationLoad.'</p></td><td><p>Place 7:'.$loadTime.'</p></td></tr><tr><td colspan="2"><p>Place 8:'; $message.= '</p></td></tr><tr><td colspan="2"><p>'.$info.'</p></td></tr><tr><td><p>Place 9:'.$outE.'</p></td><td><p>Place 10:'.$bookNumOut.'</p></td></tr><tr> <td><p>Place 11:'; $message.= $portCodeOut.'</p></td><td></td></tr></table>'; echo $message."<br>"; $to = $email; $subject = "Task"; $from = EMAIL; $headers = "From: $from"; echo $headers."<br>"; mail($to,$subject,$message,$headers);
。。。。(当中省略,可见$message)。。。。。 |