![]() |
GeoCel DevMailertm 1.51 Code Examples DevMailer Home Page Download Evaluation Copy (100k) | Purchase The Universal SMTP Mailer |
| Language(s) | Description | Example Type |
|---|---|---|
| Visual Basic | DevMailer Visual Basic Example | Full Project |
| Visual Basic, VBA | Visual Basic code snippet | Code Example |
| Visual C++ | Visual C++ code snippet | Code Example |
| Perl for Win32 | Perl Example | Code Example |
| CGI, Perl | Matt Wright's FormMail ported to NT | 3rd Party Script |
| CGI, Perl | Todd Kuebler's MailForm ported to NT | 3rd Party Script |
| CGI, Perl | Third Coast Technologies' EZ Form Mailer ported to NT | 3rd Party Script |
| CGI, Perl | NetherNet's Nether-Mail ported to NT | 3rd Party Script |
| CGI, Perl | Dimension's Form-to-Email ported to NT | 3rd Party Script |
| CGI, Perl | Tom Christensen's WizMail ported to NT | 3rd Party Script |
| ASP, VBScript | ASP VBScript Example | Code Example |
| ASP, VBScript | GeoCel WebMailerASP! (coming soon) | Geocel Script |
| ASP, JScript, VBScript | GeoCel Ad Monitor | Geocel Script |
| ASP, JScript, VBScript | GeoCel PostCard Generator | Geocel Script |
| ASP, JScript | ASP JScript Example | Code Example |
| ASP, JScript | ASP FormMail - FormMail compatible ASP Script | 3rd Party Script |
| ASP, JScript | Guestbook.cgi - by Matt Wright | 3rd Party Script |
' Geocel DevMailer 1.51
' VBScript Usage Example
' (c) 1999, Geocel International, Inc.
' Create DevMailer Object
Set Mailer = CreateObject("Geocel.Mailer")
' Add first SMTP server
Mailer.AddServer "mail",25
' Set Sender Information
Mailer.FromAddress = "support@geocel.com"
Mailer.FromName = "Geocel Support"
' Add a recipient to the message
Mailer.AddRecipient "you@yourdomain.com","You"
' Set the Subject and Body
Mailer.Subject = "Welcome to DevMailer"
Mailer.Body = "Test Message Body Line 1" & VbCrLf & _
"Test Message Body Line 2" & VbCrLf
' Send Email - Perform Error Checking
bSuccess = Mailer.Send()
If bSuccess = False Then
If Mailer.Queued = False Then
Response.Write "Could not send message..queueing failed!"
Else
Response.Write "Could not send message..queued instead!"
End If
Else
Response.Write "Message Sent Successfully!"
End If
|
| Visual Basic Code Snippet |
' Geocel DevMailer 1.51
' Visual Basic Usage Example
' (c) 1999, Geocel International, Inc.
' Create DevMailer Object
Set Mailer = CreateObject("Geocel.Mailer")
' Add first SMTP server
Mailer.AddServer "mail",25
' Set Sender Information
Mailer.FromAddress = "support@geocel.com"
Mailer.FromName = "Geocel Support"
' Add a recipient to the message
Mailer.AddRecipient "you@yourdomain.com","You"
' Set the Subject and Body
Mailer.Subject = "Welcome to DevMailer"
Mailer.Body = "Test Message Body Line 1" & VbCrLf & _
"Test Message Body Line 2" & VbCrLf
' Send Email - Perform Error Checking
bSuccess = Mailer.Send()
If bSuccess = False Then
If Mailer.Queued = False Then
MsgBox( "Could not send message..queueing failed!" )
Else
MsgBox( "Could not send message..queued instead!" )
End If
Else
MsgBox( "Message Sent Successfully!" )
End If
|
| Visual C++ Code Snippet |
// DevMailer C++ Example - (c) 1999 Geocel International
//
// This is an example of using DevMailer with C++
//
// This uses the #import method of importing a type library.
// You must have a copy of dvmailer.tlb in order to use this
// method.
//
#include <windows.h>
#include <stdio.h>
#include <comdef.h>
#import "dvmailer.tlb" no_namespace
int main(int argc, char* argv[])
{
int success=
0;
OleInitialize( NULL
); try
{_COM_SMARTPTR_TYPEDEF(Imailer,
__uuidof(Imailer));ImailerPtr
imp("Geocel.Mailer");imp->AddServer(_bstr_t("mailhost.geocel.com"),25);
imp->put_FromAddress(_bstr_t("benc@geocel.com")); imp->AddRecipient(_bstr_t("benc@geocel.com"),
_bstr_t("BenCamp")); imp->put_Subject(_bstr_t("Test
Subject"));imp->put_Body(_bstr_t("this is a test"));
success = imp->Send();
}
catch (_com_error ce)
{
TCHAR *tc;
tc=(char *)ce.ErrorMessage();
printf("COM Error: %s",ce.ErrorMessage());
OleUninitialize();
return 0;
}
OleUninitialize();
if(success)
{
printf("Successfully sent message.");
} else
{
printf("Sending of message failed.");
}
return 1;
}
|
| Win32 Perl Example |
sub send_mail {
use OLE;
$DevMailer = CreateObject OLE 'Geocel.Mailer';
$DevMailer->AddServer ("mail.domain.com",25);
$DevMailer->AddRecipient ("you\@domain.com","Your Name");
$DevMailer->{FromName} = "Geocel Support";
$DevMailer->{FromAddress} = "support\@geocel.com";
$DevMailer->{Subject} = "Welcome to DevMailer";
$DevMailer->{Body} = "Message Body\r\nLine 2\r\n";
$DevMailer->{Body} = $DevMailer->{Body} . "Line 3\r\n"
$success = $DevMailer->Send();
if(! $success) {
print "Could not send message, please check C:\\TEMP\\GEOCEL.LOG \n"
print "for more information.\n";
}
}
|