[php] loop in mail()

Pagina: 1
Acties:

  • rickmans
  • Registratie: Juli 2001
  • Niet online
Ik gebruik dus de mailfunctie van php om een mailtje te versturen, nu is er een stukje gegevens dat uit een DB wordt gehaald en wat een loopje staat:
PHP:
1
2
3
4
5
6
<?
while ($myrow = mysql_fetch_row($sel))
{
echo $myrow[1] . " " . $myrow[4]"<br>";
}
?>

Maar dat krijg ik dus niet in de mail te zien, terwijl dat er wel in hoort te staan. Hoe kan ik voor zorgen dat dit in de mail verschijnt? Het komt wel goed op het scherm.

Don't mind Rick


  • chuxiej
  • Registratie: Februari 2001
  • Laatst online: 13-07-2020
Als je nou ff het verder script inclusief mail functie post :)

www.dannyhiemstra.nl


  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?
$mailmessage = "blablablabla\n";

while ( $row = mysql_fetch_row ( $blaat ) )
{
   $line = $row [ 0 ] . " " . $row [ 4 ] . "\n";
   echo $line;
   $mailmessage .= $line;
}

$mailmessage .= "nog meer blablablabla\n";

mail ( $to, $subject, $msg, "From: rickmans <rickmans@got.net>" );
?>

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz


  • RdeTuinman
  • Registratie: Mei 2001
  • Laatst online: 16-08 07:25
Moet dat niet :
PHP:
1
2
3
<?
mail ( $to, $subject, $mailmessage, "From: rickmans <rickmans@got.net>" );
?>

zijn?

  • D2k
  • Registratie: Januari 2001
  • Laatst online: 31-08 10:19

D2k

http://www.php.net/manual/en/function.mail.php
bool mail (string to, string subject, string message [, string additional_headers, string [additional_parameters]])

Doet iets met Cloud (MS/IBM)


  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

Op donderdag 25 oktober 2001 16:26 schreef RdeTuinman het volgende:
Moet dat niet :
PHP:
1
2
3
<?
mail ( $to, $subject, $mailmessage, "From: rickmans <rickmans@got.net>" );
?>

zijn?
Je hebt gelijk. Typo :)

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz

Pagina: 1