psiMail Installation and Usage Documentation ============================================ version 1.0 Information ----------- psiMail is a DCOM object which runs as a Window NT/2000 service. It is recommended that you install Window NT 4.0 service pack 4 or greater before installing and using psiMail. Installation ------------ Copy the "psiMail.exe" executable to a directory on the target machine (ex: C:\Program Files\psiMail\psiMail.exe). From an NT command prompt in the target directory, type: psiMail -install This will install the service and register the DCOM object. Double click on the "Services" icon in the "Control Panel". When scrolling through this list of services on your machine, you should find psiMail. If you want psiMail to startup automatically when you reboot your machine, change the "Startup" option to "Automatic". If you want to start psiMail running right now, press the "Start" button. Once the psiMail service has been started, you can start using it to send email. Uninstallation -------------- To remove psiMail from a system, open an NT command prompt from the directory which contains "psiMail.exe" type: psiMail -uninstall This will remove the service. Afterwards, you can delete the psiMail directory and files. Accessing psiMail from ASP -------------------------- If you wish to use psiMail from ASP on NT servers running IIS, you need to enable out-of-process components in the IIS metabase. By default, IIS only allows use of in-process components (ie-DLL COM objects). To do this, you will need to run a Microsoft supplied ASP page which can be downloaded from: http://msdn.microsoft.com/workshop/server/components/outproc.asp Once out-of-process components are enabled, you should be able to use the following example code to send yourself an email. NOTE: You must change the SMTP server and email addresses to use your network information. <%@ LANGUAGE=VBScript%> <% Dim oPsiMail Set oPsiMail = Server.CreateObject("psiMail.Mailer") oPsiMail.Subject = "Test EMail" oPsiMail.Body = "This is a test." oPsiMail.MailServer = "mail.yourdomain.com" oPsiMail.FromName = "Web Site" oPsiMail.FromAddress = "webmaster@mail.yourdomain.com" oPsiMail.AddRecipientTO "WebMaster", "webmaster@mail.yourdomain.com" oPsiMail.AddRecipientCC "WebMaster(CC)", "webmaster@mail.yourdomain.com" oPsiMail.Queue %> psiMail Test Email Sent... DCOM Interfaces --------------- Currently, psiMail only has one interface named "IMailer". All methods and properties refer to this interface. IMailer Properties and Methods ------------------------------ property MailServer : type BSTR Should be set to your local SMTP mail server. This should be in the form of a dotted IP address (ex: mail.mydomain.com or 168.49.0.1). property FromAddress : type BSTR Should be set to the user's email address who is send this message (ex: webmail@mail.mydomain.com). property FromName : type BSTR Should be set to the user's name who is send this message. (ex: "Automatic Web Email") property Subject : type BSTR Should be set to the subject of this message. (ex: "Your recent purchase") property Body : type BSTR Should be set to the body of this message. (ex: "This is a test email...etc...") method AddRecipientTO(BSTR name, BSTR address) Adds recipients to a message. This function can be call multiple time to add additional recipients. (ex: AddRecipientTO "Joe User", "joe@hotmail.com") method AddRecipientCC(BSTR name, BSTR address) Adds carbon copy recipients to a message. This function can be call multiple time to add additional recipients. (ex: AddRecipientCC "Joe's Wife", "sweetie@hotmail.com") method AddRecipientBCC(BSTR name, BSTR address) Adds blind carbon copy recipients to a message. This function can be call multiple time to add additional recipients. (ex: AddRecipientBCC "Joe's Mistress", "hotbabe@hotmail.com") method AddAttachment(BSTR filename) Adds an attachment to a message. The filename must exist on the local machine running the psiMail server. (ex: AddAttachment "C:\\boot.ini") method Send() Sends the message and does not return until the message has been successfully delivered or has failed to be delivered to the SMTP server. method Queue() Adds the message to the queue of message to be sent and returns immediately. method GetLastError(BSTR* message) Returns the last error as a string.