NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
can not send utf-8 mail in VB.net and nusoap


Joined: 12 Dec 2012
Posts: 7
Location: iran
Reply with quote
hi


I send parameter unicode in VS.net to php for send emil .
emile sended but show ??? ??? ??????? in persian lang.
how do i fix this problem?
I am using nusoap as my soap server with the following code:


Code:
<?php

require_once("nuSOAP/lib/nusoap.php");

function SendMailD($to, $from_user, $from_email,$subject = '(No subject)', $message = ''){
      $from_user = "=?UTF-8?B?".base64_encode($from_user)."?=";
      $subject = "=?UTF-8?B?".base64_encode($subject)."?=";
 
      $headers = "From: $from_user <$from_email>\r\n".
               "MIME-Version: 1.0" . "\r\n" .
               "Content-type: text/html; charset=UTF-8" . "\r\n";
 
     return mail($to, $subject, $message, $headers);
}
   

$namespace = "http://eqbalpc.com/DMail";
// create a new soap server
$server = new soap_server();
// configure our WSDL
$server->configureWSDL("MailService");
$server ->defencoding = 'utf-8';
$server ->soap_defencoding = 'utf-8';
// set our namespace
$server->wsdl->schemaTargetNamespace = $namespace;

$server->register(
                // method name:
                'SendMailD',       
                // parameter list:
                array('to' => 'xsd:string', 'subject' => 'xsd:string','message' => 'xsd:string', 'from' => 'xsd:string', 'headers' => 'xsd:string'),
                // return value(s):
                array('return'=>'xsd:string'),
                // namespace:
                $namespace,
                // soapaction: (use default)
                false,
                // style: rpc or document
                'rpc',
                // use: encoded or literal
                'encoded',
                // description: documentation for the method
                'A simple World Mail Sender web method');
               
// Get our posted data if the service is being consumed
// otherwise leave this data blank.               
$POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA'])
                ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';

// pass our posted data (or nothing) to the soap service                   
$server->service($POST_DATA);               
exit();

?>
Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad
View user's profileFind all posts by armandelta2002Send private message
worrkeeeddd


Joined: 12 Dec 2012
Posts: 7
Location: iran
Reply with quote
yes yes yes yes yes
daniyl brayan(wwe) yes yes yes yes

Laughing

for utf sopurt nusoap use this cod
$server ->defencoding = 'utf-8';
$server ->soap_defencoding = 'utf-8';
$server ->decode_utf8 = false;
View user's profileFind all posts by armandelta2002Send private message
can not send utf-8 mail in VB.net and nusoap
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic