Search results for 'chunk_split'. 1 post(s) found.
- 2007/08/26 Send email Message With PHP
This source code describes how to send email with php with headers
<?php
function sendmsg($to,$subject,$text,$from,$file,$type) {
$content = fread(fopen($file,"r"),filesize($file));
$content = chunk_split(base64_encode($content));
$uid = strtoupper(md5(uniqid(time())));
$name = basename($file);
$header = "From: $from\nReply-To: $from\n";
$header .= "MIME-Version: 1.0\n";
$header .= "Content-Type: multipart/mixed; boundary=$uid\n";
$header .= "--$uid\n";
$header .= "Content-Type: text/plain\n";
$header .= "Content-Transfer-Encoding: 8bit\n\n";
$header .= "$text\n";
$header .= "--$uid\n";
$header .= "Content-Type: $type; name=\"$name\"\n";
$header .= "Content-Transfer-Encoding: base64\n";
$header .= "Content-Disposition: attachment; filename=\"$name\"\n\n";
$header .= "$content\n";
$header .= "--$uid--";
mail($to,$subject,"",$header);
return true;
}
?>
function sendmsg($to,$subject,$text,$from,$file,$type) {
$content = fread(fopen($file,"r"),filesize($file));
$content = chunk_split(base64_encode($content));
$uid = strtoupper(md5(uniqid(time())));
$name = basename($file);
$header = "From: $from\nReply-To: $from\n";
$header .= "MIME-Version: 1.0\n";
$header .= "Content-Type: multipart/mixed; boundary=$uid\n";
$header .= "--$uid\n";
$header .= "Content-Type: text/plain\n";
$header .= "Content-Transfer-Encoding: 8bit\n\n";
$header .= "$text\n";
$header .= "--$uid\n";
$header .= "Content-Type: $type; name=\"$name\"\n";
$header .= "Content-Transfer-Encoding: base64\n";
$header .= "Content-Disposition: attachment; filename=\"$name\"\n\n";
$header .= "$content\n";
$header .= "--$uid--";
mail($to,$subject,"",$header);
return true;
}
?>
Another posts included in "PHP"
| The three simplest regular expressions you will use in PHP (0) | 2007/09/12 |
| Adding and Subtracting Time (0) | 2007/09/13 |
| How to remove or set time limit that defined as max_execution_time in p... (0) | 2007/09/18 |
| Array_count_values (0) | 2007/08/26 |
| Calculator with basic four functions (0) | 2007/08/26 |
| Number Format (0) | 2007/08/26 |
| A Function Returns Large Random Numbers (0) | 2007/08/26 |
| Function AccountCryptPassword($password,$salt) (0) | 2007/08/26 |
Trackback : Cannot send a trackbact to this post.
-
Subject Phentermine.
2009/03/29 22:38
Phentermine 37 5mg. Phentermine. Phentermine cash on delivery.
-
Subject Free viagra.
2009/04/02 22:02
Viagra. Order viagra. Taking viagra with cialis. How does viagra work.
-
Subject Percocet 7.5.
2009/04/17 01:56
Percocet vs. lortabs.
-
Subject different money making ideas
2010/01/29 01:40
moneyideas
-
Subject different money making ideas
2010/01/29 09:46
moneyideas
-
Subject different money making ideas
2010/01/31 16:43
moneyideas

Prev

Rss Feed