WebArchiveX.SMTPMailer - ArchiveEncryptAndSend Method


ArchiveEncryptAndSend build MHT web archive and send it encrypted to a specified email address. The method is especially useful if you need to send HTML file and all it's content as encrypted file to the client mailbox. The MHT file created can be decrypted using the WebArchiveX Encoder/Decoder.

IMPORTANT: Before calling this method please make sure that all of the SMTP Server properties are correctly set.
   

C++ Syntax

Show Syntax

Script Syntax

Show Syntax

ASP Sample: VB Script (without error handling)

<%@ Language=VBScript%>

<%     ' Create web archive mailer object
    Set oWAMailer = Server.CreateObject("WebArchiveX.SMTPMailer")

    ' Set correct Charset for the web archive
    oWAMailer.oWABuilder.SetCharset "windows-1255"
    ' Setting the SMTP server properties
    oWAMailer.sMAILServer = "MySMTPServerIP"
    oWAMailer.sSMTPUser = "MyServerUserName"
    oWAMailer.sSMTPPass = "MyServerPassword"
    oWAMailer.sMailSubject = "WebArchiveX MHT file"
    oWAMailer.sSenderEmail = "info@csystems.co.il"
    oWAMailer.sSenderName = "WebArchiveX Robot"
    oWAMailer.sMailRecipients = "test@csystems.co.il"

    ' Make archive and send the MHT to the E-Mail message recipients
    oWAMailer.ArchiveEncryptAndSend "C:\inetpub\wwwroot\test\test.html", "C:\inetpub\wwwroot\test\test.mht", "CsystemsPassword"
%>

JavaScript (with error handling)

try
{
    // Create web archive mailer object
    var oWAMailer = new ActiveXObject("WebArchiveX.SMTPMailer");

    //Set correct Charset for the web archive
    oWAMailer.oWABuilder.SetCharset("windows-1255");

    ' Setting the SMTP server properties
    oWAMailer.sMAILServer = 'MySMTPServerIP';
    oWAMailer.sSMTPUser = 'MyServerUserName';
    oWAMailer.sSMTPPass = 'MyServerPassword';
    oWAMailer.sMailSubject = 'WebArchiveX MHT file';
    oWAMailer.sSenderEmail = 'info@csystems.co.il;'
    oWAMailer.sSenderName = 'WebArchiveX Robot';
    oWAMailer.sMailRecipients = 'test@csystems.co.il';

    // Make archive and write the MHT directly into Response
    oWAMailer.ArchiveEncryptAndSend('c:\\inetput\\wwwroot\\sample.htm', 'c:\\inetput\\wwwroot\\sample.mht','CsystemsPassword');
}
catch(e)
{
    alert('ERROR: ' + e.description);
}

 

- WebArchiveX API - WebArchiveX Website - C Systems Website


C Systems - Creative software solutions since 1996. All rights reserved. Terms of use.