NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
i cant send mail or smtp!


Joined: 12 Dec 2012
Posts: 7
Location: iran
Reply with quote
hi
i cant send mail or smtp for this error!??
Client found response content type of 'text/html', but expected 'text/xml'.

i want send 'text/html' format how do i can?
Exclamation Question
View user's profileFind all posts by armandelta2002Send private message


Joined: 12 Dec 2012
Posts: 7
Location: iran
Reply with quote
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 ,$subject ,$message ,$from ,$headers)
 {

$headers_internal .= 'Content-type: text/html; charset=utf-8' . "\r\n";

 $to = "armandelta2002@gmail.com"; // Reciver Email
 $subject = "?????"; // The Subject Of Your Mail
$body = $message ;
 $from = "info@whhweb.com";  // The Sender Mail

 $headers = "From: $from ";  // Just Write This We Complete this later

 mail($to, $subject, $body, $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();

?>

View user's profileFind all posts by armandelta2002Send private message
i cant send mail or smtp!
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