2
Answers

how to send email with out using smtp

satheesh babu

satheesh babu

13y
1.5k
1
Hi all,

         I wrote the code to send email using SMTP, but its not working proper, like destination mail reaching late or not getting the mail.

Can any one help me on sending email with other options like with out using smtp.

thank you..
Answers (2)
0
Jose Sebastian

Jose Sebastian

NA 3 8.7k 14y

Thanks Santhosh for replying.
But I am still not clear how it works.
The following is the WSDL generated for the
string GetData(int value);
WCF operation.
 
  <?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions name="Service1" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
- <wsp:Policy wsu:Id="WSHttpBinding_IService1_policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
- <sp:ProtectionToken>
- <wsp:Policy>
- <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
  <sp:RequireDerivedKeys />
- <sp:BootstrapPolicy>
- <wsp:Policy>
- <sp:SignedParts>
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
- <sp:EncryptedParts>
  <sp:Body />
  </sp:EncryptedParts>
- <sp:SymmetricBinding>
- <wsp:Policy>
- <sp:ProtectionToken>
- <wsp:Policy>
- <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
  <sp:RequireDerivedKeys />
  </wsp:Policy>
  </sp:SpnegoContextToken>
  </wsp:Policy>
  </sp:ProtectionToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
  <sp:Basic256 />
  </wsp:Policy>
  </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
  <sp:Strict />
  </wsp:Policy>
  </sp:Layout>
  <sp:IncludeTimestamp />
  <sp:EncryptSignature />
  <sp:OnlySignEntireHeadersAndBody />
  </wsp:Policy>
  </sp:SymmetricBinding>
- <sp:Wss11>
- <wsp:Policy>
  <sp:MustSupportRefKeyIdentifier />
  <sp:MustSupportRefIssuerSerial />
  <sp:MustSupportRefThumbprint />
  <sp:MustSupportRefEncryptedKey />
  </wsp:Policy>
  </sp:Wss11>
- <sp:Trust10>
- <wsp:Policy>
  <sp:MustSupportIssuedTokens />
  <sp:RequireClientEntropy />
  <sp:RequireServerEntropy />
  </wsp:Policy>
  </sp:Trust10>
  </wsp:Policy>
  </sp:BootstrapPolicy>
  </wsp:Policy>
  </sp:SecureConversationToken>
  </wsp:Policy>
  </sp:ProtectionToken>
- <sp:AlgorithmSuite>
- <wsp:Policy>
  <sp:Basic256 />
  </wsp:Policy>
  </sp:AlgorithmSuite>
- <sp:Layout>
- <wsp:Policy>
  <sp:Strict />
  </wsp:Policy>
  </sp:Layout>
  <sp:IncludeTimestamp />
  <sp:EncryptSignature />
  <sp:OnlySignEntireHeadersAndBody />
  </wsp:Policy>
  </sp:SymmetricBinding>
- <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
  <sp:MustSupportRefKeyIdentifier />
  <sp:MustSupportRefIssuerSerial />
  <sp:MustSupportRefThumbprint />
  <sp:MustSupportRefEncryptedKey />
  </wsp:Policy>
  </sp:Wss11>
- <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
- <wsp:Policy>
  <sp:MustSupportIssuedTokens />
  <sp:RequireClientEntropy />
  <sp:RequireServerEntropy />
  </wsp:Policy>
  </sp:Trust10>
  <wsaw:UsingAddressing />
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
- <wsp:Policy wsu:Id="WSHttpBinding_IService1_GetData_Input_policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
- <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
- <wsp:Policy wsu:Id="WSHttpBinding_IService1_GetData_output_policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
- <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
- <wsdl:types>
- <xsd:schema targetNamespace="http://tempuri.org/Imports">
  <xsd:import schemaLocation="http://localhost:1585/Service1.svc?xsd=xsd0" namespace="http://tempuri.org/" />
  <xsd:import schemaLocation="http://localhost:1585/Service1.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  </xsd:schema>
  </wsdl:types>
- <wsdl:message name="IService1_GetData_InputMessage">
  <wsdl:part name="parameters" element="tns:GetData" />
  </wsdl:message>
- <wsdl:message name="IService1_GetData_OutputMessage">
  <wsdl:part name="parameters" element="tns:GetDataResponse" />
  </wsdl:message>
- <wsdl:portType name="IService1">
- <wsdl:operation name="GetData">
  <wsdl:input wsaw:Action="http://tempuri.org/IService1/GetData" message="tns:IService1_GetData_InputMessage" />
  <wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataResponse" message="tns:IService1_GetData_OutputMessage" />
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="WSHttpBinding_IService1" type="tns:IService1">
  <wsp:PolicyReference URI="#WSHttpBinding_IService1_policy" />
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="GetData">
  <soap12:operation soapAction="http://tempuri.org/IService1/GetData" style="document" />
- <wsdl:input>
  <wsp:PolicyReference URI="#WSHttpBinding_IService1_GetData_Input_policy" />
  <soap12:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <wsp:PolicyReference URI="#WSHttpBinding_IService1_GetData_output_policy" />
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="Service1">
- <wsdl:port name="WSHttpBinding_IService1" binding="tns:WSHttpBinding_IService1">
  <soap12:address location="http://localhost:1585/Service1.svc" />
- <wsa10:EndpointReference>
  <wsa10:Address>http://localhost:1585/Service1.svc</wsa10:Address>
- <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
  <Dns>localhost</Dns>
  </Identity>
  </wsa10:EndpointReference>
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>
 
I couldnt find any information regarding the parameter 'int value' from the WSDL.
But it is there in the XSD getting generated when we add service refrence in the asp.net client application.
That is given below.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="GetData">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" name="value" type="xs:int" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="GetDataResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" name="GetDataResult" nillable="true" type="xs:string" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
Could you please help me understand how this works?
-1
Santhosh N

Santhosh N

NA 982 2.9k 14y

WSDL contains wsdl types or most commonly xml types rather than specific technology types (.net) and these can be substituted by relevant technology types from which its beinf consumed..
you can check here for more info on the types and structure of wsdl document
http://www.w3.org/TR/wsdl