Revision: 17240
Updated Code
at April 13, 2010 08:02 by acosonic
Updated Code
$random_hash = md5(date('r', time()));
$message=<<<EOL
--frontier
Content-type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Poštovanje,
uspešno ste kreirali novi nalog na aplikaciji
Vaše korisni�ko ime: $username
Ã…Â ifra: $p_sifra
Molimo vas da sa�uvate ove podatke, kako bi ih ubudu�e bez problema koristili.
Pristup aplikaciji je mogu� putem:
$http_path
--frontier
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body>
<h2>Poštovanje, </h2>
<p>
uspešno ste kreirali novi nalog na aplikaciji
</p>
Vaše korisni�ko ime: $username<br/>
Ã…Â ifra: $p_sifra<br/><br/>
Molimo vas da sa�uvate ove podatke, kako bi ih ubudu�e bez problema koristili.<br/>
<br/>
Pristup aplikaciji je mogu� putem:<br/>
$http_path
</body>
</html>
--frontier--
EOL;
print $message;
$fd = popen("sendmail -t","w") or die("Couldn't Open Sendmail");
fputs($fd, "To: [email protected] \n");
fputs($fd, "From: \"Your App\" <[email protected]> \n");
fputs($fd, "Subject: Test message from my web site \n");
fputs($fd,"MIME-Version: 1.0\n");
fputs($fd,"Content-type: multipart/alternative; boundary=\"frontier\"\n\n");
fputs($fd,"This is a message with multiple parts in MIME format.\n");
fputs($fd, $message);
pclose($fd);
Revision: 17239
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 28, 2009 03:30 by acosonic
Initial Code
$random_hash = md5(date('r', time()));
$message=<<<EOL
--frontier
Content-type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Poštovanje,
uspeÅ¡no ste kreirali novi nalog na aplikaciji virtuelni matiÄar
VaÅ¡e korisniÄko ime: $username
Å ifra: $p_sifra
Molimo vas da saÄuvate ove podatke, kako bi ih ubuduće bez problema koristili.
Pristup aplikaciji virtuelni matiÄar je moguć putem:
$http_path
--frontier
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body>
<h2>Poštovanje, </h2>
<p>
uspeÅ¡no ste kreirali novi nalog na aplikaciji virtuelni matiÄar
</p>
VaÅ¡e korisniÄko ime: $username<br/>
Å ifra: $p_sifra<br/><br/>
Molimo vas da saÄuvate ove podatke, kako bi ih ubuduće bez problema koristili.<br/>
<br/>
Pristup aplikaciji virtuelni matiÄar je moguć putem:<br/>
$http_path
</body>
</html>
--frontier--
EOL;
print $message;
$fd = popen("sendmail -t","w") or die("Couldn't Open Sendmail");
fputs($fd, "To: [email protected] \n");
fputs($fd, "From: \"Virtuelni maticar\" <[email protected]> \n");
fputs($fd, "Subject: Test message from my web site \n");
fputs($fd,"MIME-Version: 1.0\n");
fputs($fd,"Content-type: multipart/alternative; boundary=\"frontier\"\n\n");
fputs($fd,"This is a message with multiple parts in MIME format.\n");
fputs($fd, $message);
pclose($fd);
Initial URL
Initial Description
sendmail needs to be working and configured properly uses popen and fputs
Initial Title
Sending multipart/alternative (text and html both together) email messages from PHP directly via sendmail
Initial Tags
email, php
Initial Language
PHP