aspNetEmail

EmailLicense.LoadLicenseString Method 

Loads a license from a string.

public void LoadLicenseString(
   string licenseContents
);

Parameters

licenseContents
String of License contents.

Example

[VBScript]
            <%Option Explicit%>
            
            <%
            Dim msg 
            Dim lic 
            Dim contents 'license contents
            Set lic = Server.CreateObject( "aspNetEmail.EmailLicense" )
            contents = LoadLicenseContents() 'a sub that loads the contents of a license file in a string
            lic.LoadLicenseString  contents  'loads the license in memory. Now aspNetEmail objects can be freely created
            
            Set msg = Server.CreateObject( "aspNetEmail.EmailMessage" )
            msg.Server = "mail.mycompany.com"
            msg.To = "me@mycompany.com"
            msg.FromAddress = "you@yourcompany.com"
            msg.Subject = "this is a test from an ASP page"
            msg.Body = "this is the body of my message."
            
            msg.SaveToFile "c:\temp\asptest.eml", true 
            
            %>
            done.
            
            

See Also

EmailLicense Class | aspNetEmail Namespace