Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 730
Product
SMTPmail
Title
How do I get started with SMTPmail?
Problem

This article will guide you through some basic concepts and point you to available documentation and sample code. It assumes some understanding of concepts that are basic to ASP or ASP.NET. Those concepts that it does not explain, will at least be sufficiently named, so that further research may be done by the reader.

This article will also take into consideration the perspective of customers who are using SMTPmail on a hosted server.

Solution
How do I tell what version of SMTPmail is installed on my server?

If you have direct access to your server, you can tell which version of SMTPmail you are running by locating the dll named "SASMTP.dll", right-clicking, choosing "Properties" from the context menu, and selecting the "Version" tab from the resulting properties dialog. The "File Version" attribute will provide the version number of the SASMTP.dll file. The "Description" and "Comments" attributes will confirm the version of the SMTPmail product.

There are three editions of SMTPmail product:
SMTPmail Evaluation 30 day expiring evaluation of the Retail version
SMTPmail Retail Complete functionality
SMTPmailFree Limited Functionality. Includes advertisement for SoftArtisans in every email that is generated.
For a comparison of features between product editions, please see: http://www.softartisans.com/softartisans/smtpmail.html

The edition of the product as well as the version number of the dll can be confirmed via script by using the version property of the SMTP Mailer object: http://support.softartisans.com/docs/SMTPmail/prog_ref_smtp_version.htm

<%
   Set mailer = Server.CreateObject("SoftArtisans.SMTPMail")

   '--- Get and write the version of SMTPmail
   Response.Write "SoftArtisans SMTPmail Version: " & mailer.Version

   set mailer = Nothing
%>

A list of bug fixes and feature additions is made available in the SMTPmail version differences document: http://support.softartisans.com/default.aspx?PageID=113

Where can I find information on the object model?

Documentation that matches the product version is provided with the installation of SMTPmail and if installed, is found in a file named "sasmtp.chm". If you have access to the server, a shortcut is provided with the program group that branches off of the Start menu.

Online documentation is made available for the most current release of SMTPmail on the SoftArtisans website at: http://support.softartisans.com/docs/SMTPmail/

Where can I get code samples?

Code samples are installed with the product. If you do not have access to these samples, they can be downloaded from: http://support.softartisans.com/default.aspx?PageID=216

What are the most important concepts to understand before designing my application?
  1. Understand the difference between SMTPmail and an SMTP mail server.

    In order to send an email, you need two things to happen:

    1. Creation of the email by a "client" application
    2. Transmission of the email by a "server" application

    SoftArtisans SMTPmail is a SMTP email client. This means that it is responsible for creating an email according to the RFC821 standard, connecting to the mail server and communicating with it according to the SMTP protocol. SMTPmail is not responsible for delivering the email to the recipient; this is the function of an SMTP mail server application.

  2. But isn't SMTPmail installed on the server?

    Yes, SMTPmail is installed on the webserver. This is so that you can use ASP to script against the component in your web application, however, it's function is still as a client. ASP script is processed on the server. Components referenced in your ASP script must also reside on the server.

  3. Where do I begin looking for more information on SMTP mail servers?

    SMTPMail will connect with the mail server which is assigned to the RemoteHost property(http://support.softartisans.com/docs/SMTPmail/prog_ref_smtp_remotehost.htm). This will either be an IP address or a name like mail.myDomain.com. You can use the local SMTP service which is built-in to IIS on your webserver, or any SMTP server which is configured to relay emails from your webserver. If you are hosting your website with an ISP, you will need to ask your ISP how to reference their mail server. You may also need instructions for authentication.

  4. How do I know if my mailserver is working and SMTPmail is communicating with it properly?

    One way that you can verify that your mail server is working by using Telnet to connect to your mail server. Telnetting into your server is also a useful way to learn the SMTP protocol and may help you better understand the information provided in a log file generated by SMTPmail.

    To verify that SMTPmail is communicating with your mail server properly, have SMTPmail generate a log file. The log file generated by SMTPmail can be set to generate logs of different formats. To see a log file that explicitly shows all server communication, set the LoggingLevel property to "0". The following link provides documentation on how to generate a log file and how to interpret the server response, including error codes: http://support.softartisans.com/docs/SMTPmail/prog_g_log.htm

    For further detail on mail server communication protocol, refer to the RFC document. You can find details on the SMTP protocol, definitions of the commands that appear in the SMTPmail log or that you may use for Telnet, and descriptions of response codes for each step of communication with the mail server.

    An example of a log file from a successful mailing follows below. Labels have been added to distinguish the direction of communication. The log file has been presented in table format for clarity. The actual log file generated by SMTPmail does not provide labels, nor is it presented in table format.

    Comment: LogFile:
    Response: 220 myMailServer.myDomain.com Microsoft ESMTP MAIL Service, Version: 5.0.2195.6713 ready at Wed, 31 Dec 2003 14:39:17 -0500
      
    Command: HELO myMailServer
    Response: 250 myMailServer.myDomain.com Hello [IPaddress]
      
    Command: MAIL from:
    Response: 250 2.1.0 somebody@anyhost.com....Sender OK
      
    Command: RCPT to:
    Response: 250 2.1.5 somebody@anyhost.com
      
    Command: DATA
    Response: 354 Start mail input; end with .
      
    Log Comment: Message body suppressed.
    Response: 250 2.6.0 Queued mail for delivery
      
    Command: Quit
    Response: 221 2.0.0 myMailServer.myDomain.com Service closing transmission channel

  5. How can I test that SMTPmail is creating the emails properly without actually sending them out?

    You can use SMTPmail's Live property to test that your application is working without actually having a mail server. SMTPmail will just send a NET SEND alert and not an email message to the addresses specified. For more information on this property, please see: http://support.softartisans.com/docs/SMTPmail/prog_ref_smtp_live.htm

    You can also use the UseMSPickUpDir property to test that all of the email messages are created successfully by providing a path to a directory that is not being watched by your mail server. For more information on how to do this, please see: http://support.softartisans.com/kbview.aspx?ID=692

Created : 1/13/2004 4:03:15 PM (last modified : 1/13/2004 4:03:14 PM)
Rate this article!
 
Comments