Exemple #1
0
  /// <summary>Page Load.</summary>
  public void Page_Load
  (
   object     sender, 
   EventArgs  e
  ) 
  {
  
   string databaseConnectionString = null;
   string newsGroupCurrent         = null; 
   string newsServerCurrent        = null; 
     
   serverMapPath = this.MapPath("");
   if ( serverMapPath != null)
   {
    filenameConfigurationXml = serverMapPath + @"\" + filenameConfigurationXml;
   }//if ( serverMapPath != null)

   if ( !Page.IsPostBack )
   {
    UtilitySimpleMailTransferProtocolSMTP.ConfigurationFile();

    databaseConnectionString  =  UtilitySimpleMailTransferProtocolSMTP.DatabaseConnectionString;
    newsServerCurrent         =  UtilitySimpleMailTransferProtocolSMTP.NewsServer;
    newsGroupCurrent          =  UtilitySimpleMailTransferProtocolSMTP.NewsGroup;
   
    NewsServer = newsServerCurrent;
    NewsGroup  = newsGroupCurrent;

   }//if ( !Page.IsPostBack ) 
   
  }//Page_Load
Exemple #2
0
  }//PageCancel()	

  /// <summary>PageSubmit().</summary>
  public void PageSubmit()
  {
   string newsGroupCurrent  = null;
   string newsServerCurrent = null;
   
   StringBuilder sbResponse = null;
  
   newsGroupCurrent  = NewsGroup;
   newsServerCurrent = NewsServer;
   
   Feedback   = "";
   
   UtilitySimpleMailTransferProtocolSMTP.MailClient();
   
   if ( sbResponse != null )
   {
   	Feedback = sbResponse.ToString();
   }
   
  }//PageSubmit()	
  }//public static void Main(string[] argv)
  
  ///<summary>MailClient().</summary>
  public static void MailClient()
  {
   //StringBuilder sbResponse = null;

   ConfigurationFile();
   try
   {
    UtilitySimpleMailTransferProtocolSMTP  utilitySimpleMailTransferProtocolSMTP = null;
    
    utilitySimpleMailTransferProtocolSMTP = new UtilitySimpleMailTransferProtocolSMTP();
    utilitySimpleMailTransferProtocolSMTP.server   = "smtp.ephraimtech.com";
    utilitySimpleMailTransferProtocolSMTP.server   = "harvest.ephraimtech.com";
    utilitySimpleMailTransferProtocolSMTP.from     = "*****@*****.**";
    utilitySimpleMailTransferProtocolSMTP.subject  = "Hello World";
    utilitySimpleMailTransferProtocolSMTP.bodyHtml = "<HTML><BODY>Hello World</BODY></HTML>";
    utilitySimpleMailTransferProtocolSMTP.to.Add( "*****@*****.**" );
    utilitySimpleMailTransferProtocolSMTP.Send();
   }
   catch( UtilitySimpleMailTransferProtocolSMTPException e)
   {
    System.Console.WriteLine("{0}", e.What());
   }
  }//public static void MailClient()