Advertisement
Advertisement
| 08.20.2008 at 08:18PM PDT, ID: 23665477 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: |
#!/usr/bin/php
<?php
/**
* @name : sendMail
* @author Taslim Mazumder Sohel
* @mailsohel62@yahoo.com
* Function for sending email
* with Japanese Email Body, Subject, Sender Name.
*
* @param String $to : Receiver mail address.
* @param String $subject : email subject.
* @param int $body : mail body text.
* @param array $from_email : Sender mail address.
* @param array $from_name : Sender Name.
*
*/
if ($argc != 6 || in_array($argv[1], array('--help', '-help', '-h', '-?'))) {
?>
This sends e-mail in Japanese.
Usage:
<?php echo $argv[0]; ?> <TO> <SUBJECT> <FROM-MAIL> <FROM-NAME> <BODY>
<TO> Receiver mail address
<SUBJECT> email subject
<FROM-MAIL> Sender mail address
<FROM-NAME> Sender Name
<BODY> mail body text
The --help, -help, -h,
or -? options, you can get this help.
<?php
}
sendMail ($argv[1], $argv[2], $argv[5], $argv[3], $argv[4]);
function sendMail($to, $subject, $body, $from_email, $from_name)
{
$headers = "MIME-Version: 1.0 \n" ;
$headers .= "From: " .
"".mb_encode_mimeheader (mb_convert_encoding($from_name,"ISO-2022-JP","AUTO")) ."" .
"<".$from_email."> \n";
$headers .= "Reply-To: " .
"".mb_encode_mimeheader (mb_convert_encoding($from_name,"ISO-2022-JP","AUTO")) ."" .
"<".$from_email."> \n";
$headers .= "Content-Type: text/plain; charset=ISO-2022-JP \n";
$headers .= "Content-Transfer-Encoding: 7bit \n";
/* $headers .= "Content-Transfer-Encoding: quoted-printable \n"; */
/* Convert body to same encoding as stated
in Content-Type header above */
$body = mb_convert_encoding($body, "ISO-2022-JP","AUTO");
/* $body = iconv("UTF-8","ISO-2022-JP".'//IGNORE',$body); */
/* Mail, optional paramiters. */
$sendmail_params = "-f$from_email";
mb_language("ja");
$subject = mb_convert_encoding($subject, "ISO-2022-JP","AUTO");
$subject = mb_encode_mimeheader($subject, "ISO-2022-JP","B");
$result = mail($to, $subject, $body, $headers, $sendmail_params);
return $result;
}
?>
|