home *** CD-ROM | disk | FTP | other *** search
Wrap
QuickSMTP2 QSMTP2.dll (Evaluation Version) Copyright 2000 Craig Gill This .dll is a win32 .dll compiled in release mode. It's functions perform internet email from within an application. QSMTP2.dll 48k 04/03/2000 07:05pm CST Exported Functions: SendEmail - Executes the sending of an email message provided all the needed properties are set. Here's is some basic code to help get you started using the .dll: Note: You must copy QSMTP2.dll to your C:\WINDOWS\SYSTEM directory or provide the full path to the .dll when declaring it in your .bas module. Sample code for a form: ____________________________________________________ Option Explicit Private Sub SendAMessage_Click() Dim t As Long t = SendEmail("mailservername", "yourname", "youremailaddress", "recipientsname", "recipientsemailaddress", "subject", "bodyofmessage", "3", "0") If t = 100 Then MsgBox "Message sent!" End If If t < 100 Then Select Case (t) Case 1 MsgBox "Missing mailservername" & "Message not sent!" Case 2 MsgBox "Missing mailfromname" & "Message not sent!" Case 3 MsgBox "Missing mailfromemail" & "Message not sent!" Case 4 MsgBox "Missing mailtoname" & "Message not sent!" Case 5 MsgBox "Missing mailtoemail" & "Message not sent!" Case 6 MsgBox "Missing mailsubject" & "Message not sent!" Case 7 MsgBox "Missing mailbody" & "Message not sent!" Case Else MsgBox "Message not sent!" End Select End If End Sub _____________________________________________________ Sample code for the .bas module (required): _____________________________________________________ Public Declare Function SendEmail Lib "qsmtp2.dll" (ByVal ServerName As String, ByVal MailFromName As String, ByVal MailFromEmail As String, ByVal MailToName As String, ByVal MailToEmail As String, ByVal MailSubject As String, ByVal MailBody As String, ByVal MailPriority As Integer, ByVal Logging As Integer) As Long _____________________________________________________ * Note: The "3" property of the SendEmail function is the X-Priority of the message, default is 3 high priority is 2 or 1. The "0" property of the SendEmail function is whether or not to create a logfile during the SendEmail function, "0" is off, "1" is on. ** Note: This win32 .dll was created using Microsoft Visual C++ 6.0 Service Pack 2. At this time there are no plans to add file attachment ability to this .dll. You can contact me directly for help or bug reports or to just comment on it: cgill@startext.net