EFTA00578316.pdf
PDF Source (No Download)
Extracted Text (OCR)
w3 JMail 4.3.1
http://ynsw.dimac.net
www.dimac.net
websolutions
EFTA00578316
w3 JMail
Contents
ato
Manual
Preface
3
What's new?
4
Installation
5
Uninstall
5
Enqueue and MS Pickup Directory
6
Enabling PGP Encryption with w3 JMail
7
Getting started
8
Sending e-mails with w3 JMail
8
Receiving e-mails with w3 JMail
9
Encrypting e-mails with w3 JMail
11
Massmailing e-mails with w3 JMail
12
Object reference
14
JMaiI.POP3
15
JMail.Messages
17
JMail.Message
18
JMail.Headers
27
JMail.Recipients
28
JMail.Recipient
29
JMail.Attachments
30
JMail.Attachment
31
JMail.MailMerge
32
JMaiI.PGPKeys
33
JMail.PGPKeyl nfo
34
JMail.SpeedMailer
35
JMaiI.PGPDecodeResults
36
JMaiI.PGPDecodeResult
37
JMaiI.PGPDecodeResultCollection
38
Appendix: w3 JMail Registry Settings
39
Software License Agreement
41
EFTA00578317
w3 JMail
The world's most popular e-mail component!
Dimac's w3 JMail is being used by 400.000+ programmers worldwide.
w3 JMail is based on COM technology and can therefore be called from
most modern programming languages, though it has most of its users
in the ASP platform.
We are proud to present the latest version of w3 JMail, which now fea•
tures sending e•mails, receiving e•mails, encryption and mass mailing
with mailmerge. We believe we have made the best e•mail component
even better. We have taken all the input you have given us (and that's
a lot!) and most of it has been implemented in this new version, in fact
we added some more stuff we thought was really cool.
What can you do with w3 JMail? A lot we say! The first thing you want
to do is to add some outgoing e-mail notifications from your web pages,
then move on to creating your own hotmail version using the brand new
POP3 feature in w3 JMail. Securing your e•mails with PGP is a natural
step into a safer communication and with the mailmerge function of w3
JMail you will be able to send newsletters to your customers without
investing in expensive list servers. All in all, w3 JMail will give you new
possibilities to create web applications which will rock!
Now, run the installation (which you probably already have done) and
get acquainted with the world's most popular e-mail component!
Dimac
Garnisonsgatan 25 A
Box 222 28
250 24 Helsingborg
Phone: +46 42 160200
Fax: +46 42 160230
Web site: http://www.dimac.net/
E-mail: info@dimac.net/
3
EFTA00578318
w3 JMail
What's new?
ato
Dimac's w3 JMail 4.3.1 features a rewritten core and truckload of new fea-
tures, for example:
- The inner architecture of w3 JMail has been redesigned. E-mails are now
sent using the Message Object. Instead of just one object (jmail.smtpmail)
we now have more than 10 (!). For most of us jmail.message will do the trick.
Note that despite all this, w3 JMail 4 is 100% backwards compatible.
- Support for receiving e-mails from POP3 mail servers.
- You can make massive bulkmailings to thousands of thousands of reci-
pients using w3 JMails enque functions. To make it even snazzier, you can
personalize each e-mail with the mailmerge object.
- Encryption of your e-mails using the most popular encryption method, PGP
Encryption.
- Speedmailer, to send e-mails with just one function call.
So read on, get acquainted with the market's most popular e-mail compo-
nent; Dimac's w3 JMail.
- w3 JMail comes in three different editions: Free, Standard and Professional
edition. They include the following objects:
Free Edition
Mail.Message
JMail.Recipient
JMail.Recipients
JMail.SpeedMailer
JMail.Attachment
JMail.Headers
Standard Edition
(Free edition + the following)
JMail.MailMerge
JMail.PGPKeys
JMail.PGPKeylnfo
JMail.PGPDecodeResults
JMail.PGPDecodeResult
JMail.PGPDecodeResultCollection
Professional Edition
(Standard edition + the following)
JMail.POP3
JMail.Messages
EFTA00578319
w3 JMail
Installation
To use Dimac's w3 JMail you must have the jmail.dll registered at your web
server. This is done by either running the installation program or by copying
the jmail.dll file to your web server and manually registering it with the com-
mand regsvr32 jmail.dll. Any previous installations of w3 JMail must first be
removed, as described below. To run the installation you must have admini-
strator permissions on the web server.
Double click the w3JMail4.exe file to run the installation program. The instal-
lation will by default install at CAProgram FilesWimadwilkfail41 together
with this manual and some example files. More example files are viewed at
our web site at http://www.dimac.net (see Products/w3 JMail). The installa-
tion will register the jmail.dll file as a COM object.
Uninstall
Uninstall is available in the Add/Remove Programs in your settings folder.
You can also do this manually by unregistering the jmail.dll component (type
regsvr32 /U jmail.dll) and deleting the files.
5
EFTA00578320
w3 JMail
Enqueue and MS Pickup Directory
When using Dimac's w3 JMail as a mass mailer, you will use the method
nq(). nq() on the other hand uses the SMTP service provided by Microsoft
Internet Information Server (IIS).
The SMTP service has a directory where it polls for e-mails. It is called MS
Pickup directory and it is by default created as CAInetpub‘mailrootTickup.
1. The MS SMTP service must be installed on the machine where w3 JMail
is to be used (or on a remote machine where w3 JMail can access its pickup
directory). Other SMTP servers can be used as well, if they support mail
delivery through a pickup directory.
2. The queueing function is dependant of w3 JMail being able to access
to mail servers' pickup directory (often located in clinetpub mailrooflpickup,
depending on your installation). Therefore, the filesystem permissions some-
times have to be adjusted to allow the IIS guest account (IUSR) to access it.
3. Unless you are running MS Windows 2000 or later, you need to specify
the location for w3 JMail to find the pickup directory. You can do this either
at runtime, like this:
Message .MsP i ckupd i rectory = "c: \ i netpub \rna i I root \pi ckup\ "
or if you are using mailmerge:
Mai I Merge _Su I kMerge(myRS , t rue , "c : \ i netpub\ ma i I root\ pickup")
You can also do it in your web server's registry once and for all. Read more
about this in the chapter JMail registry settings.
4. For some installations, you will need to set read/write permissions for the
EVERYONE user in the pickup directory.
6
EFTA00578321
w3 JMail
Note that only the Standard and the Professional edition of w3 JMail includes
PGP Encryption!
Enabling PGP Encryption with w3 JMail
As Dimac's w3 JMail uses the worldwide renowned PGP to encrypt e-mails,
there are some preliminary steps to take before PGP support is enabled.
First an appropriate license and installation of the PGP software has to be
obtained. Useful internet links are http://www.nai.com, http://www.pgp.com and
http://www.pgpi.com.
PGP and its SDK dll (pgp_sdk.dll) must be installed on the machine where w3
JMail is to be used. Version 6.5.3 of PGP were used during development.
In order to use w3 JMail and PGP from ASP pages (assuming a Windows
NT/2000 system and IIS), the Internet Guest Account (most likely called IUSR
_your-computer-name-here) must have at least read/write access to the PGP
application and key ring files (where your encryption keys are stored). How-
ever, we recommend that you set these permissions for the EVERYONE user
as well. Check PGP configuration for finding out where these files reside on
your machine.
PGP settings for each user on the system are typically stored in CADocument
and Settings\jUserNamepApplication Data1PGP on Windows 2000.
This means that the user who installed PGP, most likely the administrator,
should have the PGP configuration files in his directory CADocuments and
SettingslAdministratoMpplication DatalPGR.
The IUSR account uses the folder "Default User" and therefore the needed
PGP application data has to be copied into that directory (CADocument and
Settings\Default UseAApplication DatalPGP1).
The directories CADocument and Settings\Default UseMpplication DatalIDGPI
and sometimes also CADocument and Settings1AdministratorlApplication Data\
POP% should have read/write permissions for the IUSR account. Replace
Administrator with the user name valid in this case.
This should be pretty much the same for NT4 systems, but the folders are
located in CAWINN71Profiles instead.
In most cases when encrypting e-mails with PGP using w3 JMail, the encryp-
tion key to be used is found by the e-mail addresses of the recipients. It is
however possible to specify one or more encryption keys to use. A key is speci-
fied either by an e-mail address "john@hisdomain.com" or a PGP key id (ex:
OxAABBCCDD). It is possible to supply multiple keys to w3 JMail by separa-
ting the identifiers with a comma (ex: "john@hisdomain.com, OxAABBCCDD,
george@hisdomain.com" ).
Regarding support: please note that since PGP is NOT a Dimac product,
support is not provided for problems directly related to the usage of POP.
7
EFTA00578322
w3 JMail
Getting started
This section is divided into four parts where you will get acquainted with
Dimac's w3 JMail functions for sending e-mails, receiving e-mails, encrypting
e-mails and mass mailing personalized e-mails. All examples are shown in
VBscript, the most common scripting language among ASP developers.
Sending e-mails with Dimac w3 JMail
The example below shows how to get up and running with Dimac's w3 JMail.
You will be shown how to create an e-mail by specifying the subject and body
and how to send it.
First of all we need to create an instance of the jmail.message object:
set msg = Server.Create0Bject( "Jklai I _Message" )
Now lets turn on logging to make any debugging easier:
msg _Logging = true
We need to provide a sender as well as a recipient:
msg _From = "john.doe@mydomain.com"
msg.FromName = "John Doe"
msg.AddRecipient
i sa.s i mpson@spr i ngfie d.com"
The addRecipient method can be used multiple times to add more than one
recipient. Also, it can take an optional parameter which specifies the name of
the recipient:
msg.AddRecipient "de I i veryboy@futu rama .com" , "Fry"
msg.AddRecipient "theblob@southpark.com", "Gartman"
Ok, now we should add a subject:
msg _Subject = "How are you?"
and a body. The example below also shows how to add carriage returns:
msg _Body = "This w3 J61aiI stuff rocks!" & vbCrLf
Another way to create the body of the e-mail is to use the appendText
method, which can be used multiple times to build the e-mail body:
msg .appendText "Here's some text."
msg.appendText "And here' s some more"
There you go, the e-mail message is complete, now all we need is to send it.
To do that we need to enter the address of a valid mail server which accepts
incoming e-mails from your web server:
msg.Send( "mai _myDomain.com" )
That's it! Once you have acquainted yourself with the basics of w3 JMail, you
can find more elaborate examples at our site http://www.dimac.net/.
8
EFTA00578323
w3 JMail
Receiving e-mails with w3 JMail
Introducing with w3 JMail 4 is the ability to connect to POP3 servers and
receive e-mails.
This example will receive the first e-mail in a given mailbox and display it on
the web page together with its attachments which in turn are saved to the
servers' disc.
First of all we have to create an instance of the JMail.POP3 object:
Set pop3 = Server . Create0bj ect( "JMai _P0P3" )
Then we need to connect to our POP3 server, providing a user name and a
password:
pop3. Connect "username", "password", "mai I _mydoma i n _coin"
Having connected to the mail server, we can now check how many e-mails
reside in the mailbox:
Response.Write( "You have " & pop3-count &_
" e-mails in your mai lbox lar><I3r>" )
If there are any messages, we will get the first of them by using the Mes-
sages collection:
if pop3.count > 0 then
Set msg = pop3- Messages. item(1)
Note that the Messages collection starts 1 and not 0 as most other collec-
tions and arrays do. This is because it is the standard way in the world of
POP3 mail servers.
9
EFTA00578324
w3 JMail
Ok, now we have an e-mail. The e-mail is an instance of the Message object
that we used earlier when we sent an e-mail. This means it has all the me-
thods and properties as the Message object has. What we want to do is to
iterate through the Recipients collection that holds (naturally) all the reci-
pients of the message and create a nicely formatted string we can use in our
HTML.
ReTo =
"
ReCC =
"
Set Recipients = msg_Recipients
separator = ", "
For i = 0 To Recipients.Count - 1
If i = Recipients.Count - 1 Then
separator = ""
End If
Set re = Recipients.item(i)
If re.ReType = 0 Then
ReTo = ReTo & re.Name & " "& re.EMail
re.EMail & separator
else
&
>" &_
ReCC = ReTo & re.Name & " "& re.EMail
re.EMail & separator
&
>" &_
End If
Next
Ok, that done, let us display our e-mail message:
<html>
<body>
Subject .60. msg.Subject %><br>
From <%= msg.FromName %><br>
Recipients To <%= ReTO %><br>
Recipients CC <%= ReCC %>
<hr>
Body<br>
<pre><%. msg.Body %></pre>
</body>
</html>
<14
After that we close our POP3 connection:
pop3.Disconnect
To make it even neater we could add handling of attachments and HTML
e-mails, that and much more are covered in the JMail.POP3 section later in
this manual.
10
EFTA00578325
w3 JMail
Encrypting e-mails with w3 JMail
To use encryption with w3 JMail, you will need to install PGP on your web
server. This is explained in detail under section Enabling PGP Encryption
with Dimac w3 Mail at page 7.
To run this example, you must have a PGP key installed for the recipient at
your web server. You can learn more about how to install PGP keys in your
PGP documentation.
First start off with the code you created when you ran the first w3 JMail exam-
ple. Then, right before the line that sends your e-mail:
msg _Send( "mai I .myDornai n _cam" )
you insert the following:
jmai I .PGPEncrypt = true
And that's it! w3 JMail uses PGP to encrypt your e-mails with the PGP keys
installed at the web server. If the web server does not have PGP keys for the
recipients, w3 JMail will throw an error.
11
EFTA00578326
w3 JMail
Note that only the Standard and the Professional edition of w3 JMail
includes massmailing and mailmerge!
Massmailing personalized e-mails with w3 JMail
A very common way to keep in touch with your web site visitors is to send
e-mails to them whenever you update your website. With w3 JMail mail-
merge functions you can personalize each e-mail with the recipients name
and other details that you have collected. Mailmerge works in the way that
you first create a template from which you create the e-mails. The template
can contain any number of merge fields which are replaced with personal
information. For example, if the following were your template:
Hi %%name%%!
You have %%ordersCount%% orders in process.
You could easily see the merge fields as they begin and end with a double
percentage mark (%).
Now let us take a look at the example. First we will create a message object
that will serve as a template for the merge:
set msgTemplate = Server .CreateObject ( "Mai I _Message" )
msgTemplate.Subject = "Hi %%Name%%!"
msgTemplate.Body = "Hello %Mame&
bla bla..."
msgTemplate. From = "me@myDomain.com"
msgTemplate.FromName = "Mailinglist infol-
msgTemplate.AddRecipient "7070EMail%%", "%%Name%%"
Note how we actually use merge fields in the recipient fields as well. There,
our message template is done. Next we create the mailmerge object:
set mMerge = Server .CreateObject ( "JlAai I.Mai [Merge" )
mMerge.MailTemplate = msgTemplate
That was the first part, now we need a group of recipients. In this example
we use an ADO recordset, however, it is possible to do it manually if you
have a list of recipients on a file or so. It is assumed that we already have
established a connection to our SQL server and that the connection is called
sqlCon.
MyRS = sqlCon.execute("SELECT name, email FROM ourCustomers")
MMerge.BulkMerge myRS, false, "mail.myDomain.com"
As you see we enter our mail server address because the BulkMerge method
sends the e-mails as soon as it has merged them, thus you don't need to use
the send() method.
12
EFTA00578327
w3 JMail
The BulkMerge method can also be used in conjunction with w3 JMail's
enque method. Just set the second parameter to TRUE, skip the last para-
meter and the e-mails will be enqued, which is most often the preferred way
to do it as massmailing can be a bulky operation (hence the name Bulk-
Merge).
As BulkMerge sends e-mails as it merges, we are finished.
13
EFTA00578328
w3 JMail
Object reference
JMail.POP3
15
JMail.Messages
17
JMail.Message
18
JMail.Headers
27
JMail.Recipients
28
JMail.Recipient
29
JMail.Attachments
30
JMail.Attachment
31
JMail.MailMerge
32
JMail.PGPKeys
33
JMail.PGPKeyInfo
34
JMail.SpeedMailer
35
JMail.PGPDecodeResults
36
JMail.PGPDecodeResult
37
JMail.DecodeResultsCollection
38
14
EFTA00578329
w3 JMail
JMaiI.POP3
Note that JMail.POP3 is included only in the Professional version of w3 JMail!
Connect(Username. Password. Server, Port) :
Opens the connection to the POP3 server. The Port argument is optional and defaults to 110.
mailbox. Connect "john", "qwerty", "ma i I . myDoma n _corn"
Delete Messages() :
Deletes all messages from the mail server.
Mai I box. De I e teMessages
DeleteSingleMessage(MessagelD) :
Deletes a single message on the mail server.
Mail box. De I eteS i ng I eMessage 1
Disconnect() :
Closes the connection to the server.
ma i I box _Disconnect
Down loadHeaders() :
Downloads all headers and adds them in the Messages collection.
Ma i I box _Down I oadHeade rs
Down loadMessages() :
Downloads all messages.
Mail box . Down I oadMessages
DownloadSingleHeader(MessagelD) :
Downloads the headers of a single message, and adds them to the Messages collection.
Ma i I box _Down I oadS i ng I eHeader 1
DownloadUnreadMessages() :
Downloads all unread (messages that have not been downloaded by ANY clientsoftware) e-mails. The
e-mails are added to the messages collection. Note this command has been removed from the POPS
specification (RFC1725), so it may not be supported by all mail servers.
Ma i I box _Down I oadUn readMessages
15
EFTA00578330
w3 JMail
GetLastUnreadMessage() :Integer
Returns the ID of the first unread (message that has not been downloaded by ANY client software)
message. Return 0 if no messages has been accessed, -1 if this command is not supported by the
server. Note this command has been removed from the POPS specification (RFC1725), so it may not
be supported by all mail servers.
I astMessage = Mail box . Get LastUnreadMessage
GetMessageUID(MessagelD) : String
Returns the server's unique id for this message.
Mai I box .GetMessageU ID 1
Count() : Integer
Returns the number of messages on the POPS server.
mai I box . Count
Logo : String
This is the log created by w3 JMail when logging is set to TRUE.
Response .Wr i te( mailbox. Log )
Logging() : Boolean
Enables/Disables logging in w3 JMail. Default value is FALSE.
mai I box .Logg ing = true
Messages() : Pointer
Returns the Messages object through which you can access the messages.
set messages = mai I box _Messages
Size() : Integer
Returns the total size of your mailbox in bytes.
size = mai I box .S ze
DownloadSingleMessage(Index) : Pointer
Downloads, returns and puts the specifeid message in the Messages collection.
set msg = pop3.Down I oadS ng I eMessage ( 1 )
Timeout : Integer
Timout in seconds for the socket used.
P0P3.Timeout=300
16
EFTA00578331
w3 JMail
JMail.Messages
Note that JMaitMessages is included only in the Professional version of w3
Clear() :
Clears the collection. Note it will NOT remove ANY e-mails from your mail server.
Messages .CI ear
Count() : Integer
Returns the number of messages in the collection.
i = Messages.Count
Item(Index) : Pointer
Returns a message object.
set msg = Messages. I tem(0)
17
EFTA00578332
w3 JMail
JMail.Message
AddAttachment(FileName, islnline, ContentType) : String
Adds a file attachment to the message. If Inline is set to TRUE, the attachment will be added as an
inline attachment and addAttachment() returns the content id. This is only useful when sending HTML
e-mails.
Message.AddAttachment("c:\autoexec.bat") or cid = Message.AddAttachment("mytmage.gif",
TRUE)
AddCustomAttachment(FileName, Data, islnline) : String
Adds a custom attachment. This can be used to attach "virtual files" like a generated text string or
certificate etc. If Inline is set to TRUE, the attachment will be added as an inline attachment and
addAttachment() returns the content id. This is only useful when sending HTML e-mails.
Message.AddCustomAttachment("readme.txt", "Contents of file")
AddHeader(XHeader, Value) :
Adds a user defined X-header to the message.
Message.AddHeader "Or ig inat ing- IP" , "193.15.14.623"
AddNativeHeader(Header, Value) :
Adds a header to the message.
Message.AddNat iveHeader "MIA-Settings", "route"
AddRecipient(emailAddress, recipientName, PGPKey) :
Adds a recipient to the message.
JMai I .AddRecipient " i nfo@d mac. net"
AddRecipientBCC(emailAddress, PGPKey) :
Adds a blind carbon copy recipient to the message. AddRecipientBCC can be used multiple times for
several recipients. RecipientName is optional. PGPKey is optional, if not supplied and PGPencryption is
set to TRUE, it will default to emailAddress.
Message. AddRec pi entBCC " nfo@d i mac. net"
AddRecipientCC(emailAddress, recipientName, PGPKey) :
Adds a carbon copy recipient to the message. AddRecipientCC can be used multiple times for several
recipients. RecipientName is optional. PGPKey is optional, if not supplied and PGPencryption is set to
TRUE, it will default to emailAddress.
Message. AddRec pi entCC " nfogd i mac . net"
18
EFTA00578333
w3 JMail
AddURLAttachment(bstrURL, bstrAttachAs, islnline, bstrAuth) : String
Downloads and adds an attachment based on a URL. A seconds argument, "AttachAs", is used for
specifying the filename that the attachment will receive in the message. If Inline is set to TRUE, the
attachment will be added as an inline attachment and addAttachment returns the content id. This is useful
when sending HTML e-mails. A last and optional argument is used for optional VVVVW-Authentication.
Message .AddURLAttachment ("http ://minv.mydomain .corn/myfi I e.txt" , "mylile.txt") or
Message .AddURLAttachment ("h ttp ://wvnv.mydoma i n .com/myfi I e t xt" , "myfi I e txt" , fa I se,
"myUserName:myPassword") or cid = Message .AddURLAttachment ("http://i napes .d imac . net/
dimaclogo.gif", "dimaclogo.gif",true )
AppendBodyFromFile(FileName) :
Clears the body of the message and replaces it with the contents of the file.
Message.AppendBodyFromFi le "c : \mytext.txt"
AppendHTML(Text) :
Append "text" to HTMLBody of message.
Message.AppendHTML("<h4>Hel I o</h4>")
AppendText(Text) :
Append "text" to body.
JMai I .AppendText "Text appended to message Body"
Clear() :
Clears the message object, and gives you a new clean message.
Message-Clear
ClearAftachments() :
Clears the list of attachments.
Message .CI ea rAtt achments
ClearCustomHeaders() .
Clears all custom headers.
Message _CI ea rCus tomHeade rs
ClearRecipients() :
Clears the recipient list.
Message _CI earRec i p i ents
19
EFTA00578334
w3 JMail
Close() :
Forces w3 JMail to close a cached connection to a mail server.
Message. CI ose( ) ;
DecodeHeader(Header) : String
Decodes a message header.
Response.Wr i te( Message .DecodeHeader( Headers("Rep I yTo") ) )
ExtractEmailAddressesFromURL(bstrURL, bstrAuth) :
Downloads and adds e-mail addresses from a URL.
Message.ExtractErnai lAddressesFromURL "http:/Awiw.mydomain.com/emai IList .asp"
GetMessageBodyFromURL(bstrURL, bstrAuth) :
Clears the body of the message and replaces it with the contents of the URL. The content type is
automatically set to match the content type of the URL. The second argument (login and password)
is optional.
Message.GetMessageBodyFromURL "http://duplo.org/", "log in :password"
Keylnformation(keyldentifier) : Pointer
Returns a PGPKey object holding information for the keys matching the supplied identifier.
keys = Message Key I nformat i on (I" j ane@herdomai n _corn")
LoadFromStream(Strearn) :
Loads a message from a stream. Note the stream data must be compatible with the message format
described in RFC822.
Message_ LoadFromStream myStream
LogCustomMessage(Message) :
Logs a custom user message to the w3 JMail log. This function works ONLY if logging is set to TRUE.
Message_LogCustomMessage "Hello world"
nq()
Append the e-mail to the mail queue and returns.
Message. nq
20
EFTA00578335
w3 JMail
ParseMessage(NlessageSource) :
Parses a message. MessageSource must be compatible with the message format described in RFC822.
Message. ParseMessage myHeaders & vbCrLf & myBody
SaveToStream(Stream) :
Saves the message source ( RFC822 compatible message ) to a stream.
Message.SaveToStream myStream
Send(mailServer, enque) : Boolean
Sends the message. Mail servers is a string with one or more hostnames separated by a
semicolon. A username and password can also be provided for each server in the format
username:password@myhost.mydomain.com.
Message.Send( "myMa i !Server" ),
Message _Send ("myUserName :mypasswordftmymai I server. mydoma n com")
ScnciToNewsGroup(ServerName, Newsgroups) :
Sends the message to Newsgroups (Separated by a "7) using the NNTP server specified.
SendToNewsGroup myNNTPServer, , "alt. test, a It. test _test"
VerifyKeys(keyString) : Boolean
Returns TRUE if ALL the supplied keys where found in the local keyring.
Jlilai I _Me r i fyKeys "rec i pi entl@herdoma i n con , rec i pi ent2@herdoma n con"
About() : String
Some useful information.
Response.Write( Message.About )
Attachments() : Pointer
Returns the Attachments collection.
set attachments = Message.Attachments
Body() : String
Returns the message's body.
Response.Write( lAessage.Body ) or Message.Body = "Hello world,"
BodyText() : String
Returns the entire raw unparsed body ( Text - Headers.Text ).
Response.Wr i te( Message .BodyText )
21
EFTA00578336
w3 JMail
Charset() : String
The charset of the message. The default is "US-ASCII".
Message. Charset - "US-ASCII"
ContentTransferEncoding() : String
Specifies the content transfer encoding. The default is "Quoted-Printable".
Message. ContentTransf erEncod i ng = "base64"
ContentType() : String
Returns the Body's Content-Type.
Response.Write( Message .ContentType )
Date() : Date
Returns the DateTime when the message was sent.
Response.Write( Message _Date )
DeferredDelivery() : Date
Sets deferred delivery of messages. If the mail server supports it the message won't be delivered until
this date and time.
Message .0ef erredDe I i very = CDate( "2000-12-12" )
Encoding() : String
This can be used to change the default attachment encoding from base64. Valid options are "base64"
or "quoted-printable".
Message. Encoding = "base64"
EncryptAttachments() : Boolean
Set to TRUE all attachments will be encrypted too if encryption is enabled.The default value is TRUE.
Message.EncryptAttachments = true
ErrorCode() : Integer
Contains the error code if message.silent is set to TRUE.
Response.Write( message-ErrorCode ) ;
ErrorMessage() : String
Contains the error message if message.silent is set to TRUE.
Response-Write( message Er rorVessage );
22
EFTA00578337
w3 JMail
ErrorSource() : String
Contains the error source if message.silent is set to TRUE.
Response .Wr i te( message. Er rorSource ) ;
From() : String
The sender's e-mail address.
Response _VW i te( Message. From ) or Message _From = "ky I egtwi npeaks con"
FromName() : String
The sender's name.
Response-Write( Message. FromName ) or Message.FromName . "John Doe"
Headers() : Pointer
Returns the header's object.
set Headers = Message.Headers
HTMLBody() : String
Used to set and get the HTML part of the message body (if any).
Message .HTMLBody = "<html><body>Hello<br></body></html>"
ISOEncodeHeaders() : Boolean
Encodes header strings according to iso-8859-1 character sets. The default is TRUE.
Message. ISOEncodeHeaders = false
Log() : String
This is the log created by w3 JMail when logging is set to TRUE.
Response.Wr ite( Message. Log ) ;
Logging() : Boolean
Enables/Disables logging in w3 JMail.
Message-Logging = true
MailData() : String
The raw maildata as the e-mail will look like when it is delivered.
Response.wr i te( Message.
i I Data )
23
EFTA00578338
w3 JMail
MailDomain() : String
This can be used to override the EHLO/HELO statement to your mail server.
Message Ma i ldoma i n = "he I I o. war I d .com"
MailServerPassWord() : String
Used to specify the password for SMTP server authentication if the mail server requires a user to log in.
Message_ Mai IServerPassword = "myPassword"
MailServerUserName() : String
Used to specify the username for SMTP server authentication if the mail server requires a user to log in.
Message.Mai IServerUserName = "myliserName"
MimeVersion() : String
Specifies the mime version. The default is "1.0".
Message. M meVers i on = "1.0"
MsPickupdirectory() : String
The path to the pickup directory of MS SMTP service. If you run MS windows 2000, w3 JMail will
autodetect the path from registry settings.
Message_MsP i ckupd i rectory = "c Arnyf o I der"
PGPEncrypt() : Boolean
Set to TRUE, the e-mail will be encrypted when the message is sent, using POP.
Message_ PGPEncrypt = true
PGPPassphrase() : String
The PGP passphrase used when signing.
Message .PGPPassPh rase = true
PGPSign() : Boolean
Set to TRUE, the e-mail will be signed when the message is sent, using POP.
Message.PGPSign = true
PGPSignkey() : String
An e-mail address or a PGP key id identifying the key to be used for signing.
Message_ PCPS ngKey = "char I i egh isdomain.com"
24
EFTA00578339
w3 JMail
Priority() : Byte
Returns the message priority. 3 is normal priority.
Response .Wr te( Message Pr i or ty ) or Message pr i or ity = 2
Recipients() : Pointer
Returns the Recipient's collection.
set recipients = Message Rec i pi ents
RecipientsString() : String
Readonly property of all recipients of this message.
Response.Wr ite( lAessage _Rao ip ents )
ReplyTo() : String
Specifies an optional reply address.
Message.RepllyTo = "pres dent@cl i mac. net"
RetumReceipt() : Boolean
Specifies whether or not the sender requires a return receipt. The default value of the property is FALSE.
Message-ReturnReceipt = true
Silent() : Boolean
Set to TRUE, w3 JMail will not throw exceptions. Instead Message.send() will return TRUE or FALSE
depending on the success of the operation.
Message.si lent = true
SimpleLayout() : Boolean
Set to TRUE to reduce the number of headers w3 JMail produces.
Mai I .3 imp I eLayout = true
Size() : Integer
Returns the total size of the message in bytes.
Response .Wr te( Message _Si ze )
Subject() String
The message's subject.
Response.Write( Message.Subject ) or Message.subject = "w3 JMa i I is here!"
25
EFTA00578340
w3 JMail
Text() : String
Returns the entire message source.
Response .Wr te( Message Text )
UsePipelining() : Boolean
Overrides if w3 JMail should use pipelining on a server that supports it.
Message.Pipelining = false
Version() : String
Returns version information.
Response .Wr te( Message .Ve rs i
)
PGPDecode( DecodeBody, DecodeAttachments ) : Pointer
This method will decode the contents of the message object using POP. It will decrypt the contents and
verify any signatures. A passphrase must be specified for decryption. The two parameters allow for only
decoding parts of a message.
Set DecodeBody to TRUE to decrypt/ verify the text parts of the message (Body and HTMLBody). Set
DecodeAttachments to TRUE to decrypt/ verify the attachments of the message.
The return value is an POPDecodeResults object, holding the results of the operation. PGP errors,
signature verification status and other results for all decoded parts of the message are reported through
this object.
decodeResu It s = Message PGPDecode ( true, true ) ;
EnableCharsetTranslation : boolean
Set to TRUE, which is the default, JMail will convert the text given in the Body or HTMLBody properties to
the charset specified in the property Charset if needed. This is not desired if the text is already encoded.
If you for instance put utf-8 encoded text into the Body , and therefore set the Charset to "utf-8", you
should set this property to FALSE.
Message .Enab I eCharsetTrans I at i on = false;
26
EFTA00578341
w3 JMail
JMail.Headers
GetHeader(Headername) : String
Returns the value of HeaderName.
Response.Write( Headers.GetHeader( "X-Mailer" ) )
Text() : String
Returns all headers.
Response.Write( Headers.Text )
27
EFTA00578342
w3 JMail
JMail.Recipients
Add(Value):
Adds a recipient to the collection.
Rec i pients.Add re
Clear() :
Clears the collection.
Recipients.Clear
Count() : Integer
Returns the number of recipients in the collection.
i = Rec i p ents _Count
ttem(Index): Pointer
Returns a recipient object.
set re = Rec i pients. I tem (0)
28
EFTA00578343
w3 JMail
JMail.Recipient
New(Name, EMail, recipientType) : Pointer
Creates a new recipient, whom you can add to the Recipients collection.
set re = Recipient.New( "Firstname Lastname", "nameitdomain.com", 0 )
EMail() : String
Returns the recipient's e-mail.
Response.Write( Rec ipi ent EMa i I )
Name() : String
Returns the recipient's name.
Response.Write( Rec i pi ent _Name )
ReType() : Integer
Returns the recipient's type ( To = 0, CC = 1, BCC = 2).
Response
i te( Rec p ent ..ReType )
29
EFTA00578344
w3 JMail
JMail.Attachments
Add(Attachment) :
Adds an attachment to the collection.
Attachments.Add( re )
Clear() :
Clears the collection.
Attachments-Clear
Count() : Integer
Returns the number of attachments in the collection.
Attachments-Count
Item(Index) : Pointer
Returns an attachment object.
set attachment = Attachments. I tem(0)
30
EFTA00578345
w3 JMail
JMail.Attachment
New(FileName, ContentType, Data) : Pointer
Creates a new attachment which you can add to the Attachments collection. If Data is specified w3 JMaiI
creates a custom attachment containing the data, else it reads FileName from the disk.
set attachment = Attachment .New( "myAttachment.text", "text/plain", "this is my new
text file" )
SaveToFile(FileName) :
Saves the attachment to the disk.
Attachment .SaveToFi le "c:\ incorni ngAttachments\" & Attachment _Name
ContentType0 : String
Returns the attachment's ContentType.
Response.Write( Attachment .ContentType )
Data() : String
Returns the attachment's data.
Response.Write( Attachment .Data )
BinaryData() : String
Returns the attachment data in binary untranslated form.
Response.Write( Attachment .BinaryData )
islnline() : Boolean
Returns TRUE if the attachment is inline.
Response.Write( Attachment. I s Inl ine )
Name() : String
Returns the attachment's file name.
Response.Write( Attachment .Name )
Size() : Integer
Returns the attachment's size.
Response.Write( Attachment .S i ze )
31
EFTA00578346
w3 JMail
JMail.MailMerge
Note that JMaitMailMerge is included only in the Standard and the Professional version of w3 JMail!
BulkMerge(RecordSet, enque, Maildestination) :
Merges an entire recordset with mailTemplate and sends alternatively enques it. Mail server or pickup
directory is specified in mail destination.
Mai IMerge.BulkMerge myRS, false, "mai I .myDomain.com" or Mail Me rge Bu I klAerge myRS,
true, "c :\ netpub\ mai I root \ pickup"
Expand() : Pointer
Merges MailTemplate with user defined variables specified in the Item property.
Mai I Me rge . Expand
ExpandFromRecordSet(RecordSet) : Pointer
Merges one row from an ADO Recordset with MailTemplate.
set msg = Mai IMerge.ExpandFromRecordSet( myRS )
SetDebugMode(TestMailAddress,TestCount) :
Tells Mailmerge to enter debug mode. All recipients in your e-mails will be set to TestMailAddress,
TestCount e-mails will be sent to you.
Mail Merge. SetDebugMode "myEMaill@company.com", 10
Item(VariableName) : String
Sets your merging variables manually. Note you can not combine this with recordset merges.
Mai Norge. Item( "CustomerName" )
"Lisa Nilsson"
MailTemplate() : Pointer
Sets your own created Message object (it will serve as a template in the merge process).
MailMerge.MailTemplate = myMsg
MergeAttachments() : Boolean
If set to TRUE, attachments will also be scanned for merge variables and be mailmerged.
Mai Merge-MergeAttachments = True
32
EFTA00578347
w3 JMail
JMaiI.PGPKeys
Note that JMail.PGPKeys is included only in the Standard and the Professional version of w3 JMail!
Count() : Integer
The number of keys in the collection.
Response.write( keys.Count )
Item(Indox) : Pointer
Returns PGPKeyInfo objects from the collection.
key = keys. I tem(0)
33
EFTA00578348
w3 JMail
JMaiI.PGPKeylnfo
Note that JMaitMailMerge is included only in the Standard and the Professional version of w3 JMail!
KeyCreationDate0 : String
The date the key was created.
Response.write( keys.KeyereationDate )
KeyID() : String
The id of the key.
Response.write( KeylD )
KeyUser() : String
The name of the user who created the key.
Response.write( keys.KeyUser )
34
EFTA00578349
w3 JMail
JMail.SpeedMailer
EnqueMail(FromEMail, RecipientEMails, Subject, Body, MsPickupdirectory) :
Places the e-mail in the mail queue. All data is provided through parameters.
Speedhlai I .EnqueMai I "me@mydomain.com","recipient@hisdomain.com","This is a
test" , "Examp le"
SendMail(FromEMail, RecipientEMails, Subject, Body, MailServers) :
Sends an e-mail with SMTP, all mail data is provided through parameters.
SpeedMai I .Sendrilai I "me@mydomai n.com","rec ipient@h isdomai n.com","Th is is a
test" , "Examp le" ,"ma i I .mydomai n _corn"
SendXMLMail(XML) :
More info about the function can be found at http://xml.dimac.netinamespaceimail.
SpeedliCa i I er SendXMLWa i I XIALSt r ng
35
EFTA00578350
w3 JMail
It
JMaiI.PGPDecodeResults
Note that JMaitMailMerge is included only in the Standard and the Professional version of w3 JMail!
This object holds the individual results from a PGPDecode() operation, for each part
of the message.
Body : Pointer
This property returns a PGPDecodeResult object for the message body.
HTMLBody : Pointer
This property returns a PGPDecodeResult object for the message html body.
Attachments : Pointer
This property returns a PGPDecodeResultCollection object. It is a collection holding PGPDecodeResult
object for each attachment in the message.
36
EFTA00578351
w3 JMail
JMaiI.PGPDecodeResult
Note that JMaitMailMerge is included only in the Standard and the Professional version of w3 JMail!
This object holds the results of a PGPDecode() operation.
SigningUsed : boolean
Returns true if the message part was signed, false otherwise.
EncryptionUsed : boolean
Returns true if the message part was encrypted, false otherwise.
SignatureGood : boolean
Returns true if the signature (if any) was successfully verified, false otherwise.
Success: boolean
Returns true if the PGPDecode() operation finished without errors, false otherwise.
PGPErrorCode : integer
Returns the PGPError code. If no error occured, this will be 0. Use the property "Success" to determine
if the operation failed.
PGPErrorMsg : String
Returns a string describing the error code found in the "PGPErrorCode" property. If no error occured this
will contain an empty string. Use the property "Success" to determine if the operation failed.
37
EFTA00578352
w3 JMail
JMaiI.PGPDecodeResultCollection
Note that JMaitMailMerge is included only in the Standard and the Professional version of w3 JMail!
This object is a collection holding PGPDecodeResult objects. The number of items
should equal the number of attachments.
long Count
Returns the number of items in this collection.
PGPDecodeResul Item( index )
Returns the item with the given index. The object returned corresponds with the attachment with the same
index in the Attachments collection in the message object.
38
EFTA00578353
w3 JMail
Appendix: w3 JMail Registry Settings
The registry settings are automatically set when running the installation pro-
gram. You also have the possibility to set them manually.
All w3 JMail's registry keys are located in HKEY_LOCAL_MACHINEI
SOFTWAREIDimaclw3JMail4.
'FileAttachments'
Valid values: "true" , "false"
default-value = true
This can be used to turn off the function AddAttachment( Filename ). You can
specify virtually any file on the server and attach it to an e-mail.
'AllowDownloads'
Valid values: "true" , "false"
default-value = true
Set to FALSE, the functions
- AddURLAttachment
- ExtractEmailAddressesFromURL
- GetMessageBodyFromURL
will be disabled.
'ClientLogging'
Valid values: "true" , "false"
default-value = false
If w3 JMail is used from ASP pages and this value is set to TRUE, w3 JMail
will create an extra header in sent e-mails called `X-USER_IP" containing the
ip address of the computer requesting the ASP page.
'POP3Enabled'
Valid values: "true", "false"
default-value = true
Set to FALSE, the POP3 support in w3 JMail will be disabled.
'NewsGroupSendEnabled'
Valid values: "true", "false"
default-value = true
Set to FALSE, the method "SendToNewsGroup" will be disabled.
39
EFTA00578354
w3 JMail
'Default Mai'server'
Valid values: a string representing the name/address of the desired default
mail server. If no default mail server is to be used then set the value to "" (an
empty string) or remove the string value.
default-value = ""
If this field is present and not equals to "" (empty string) the name will be
used as mail server regardless of whatever mail server stated with w3 JMail
properties and methods.
'Default Pickupdirectory
Valid values: a string representing the path to use as pickup directory. Leaves
this field blank or deletes it if you do not wish to use a default pickup direc-
tory.
default-value = ""
If this field is present and not equals to "" (empty string) the name will be
used as pickupdirectory regardless of whatever pickup directory stated in w3
JMail properties and methods.
40
EFTA00578355
w3 JMail
Software License Agreement and Limited Warranty
Notice to user:
Please read this License Carefully. This is a legal agreement between the end
user ("Licensee") and DIMAC AB. The enclosed software and documentation are
licensed by DIMAC AB to the original individual customer for use only on the terms
described in this License Agreement (this "License"). Opening the enclosed CD
envelope and/or using the Software indicates that the end user accepts and agrees
to comply with these terms.
1. GRANT OF LICENSES
(a) DIMAC AB hereby grants to Licensee a non-exclusive, nontransferable, license
(without the ability to sublicense) to use this product and make one copy of the
Software in machine readable form for backup purposes.
(b) DIMAC AB retains title to the Software in all forms whatsoever.
(c) All rights not expressly granted herein are reserved by DIMAC AB.
2. LICENSE FEES
This license shall have no force or effect unless and until Licensee shall have sub-
mitted to DIMAC AB all applicable license fees in full. All such fees are exclusive
of any taxes, duties, licenses, fees, excises or tariffs now or hereafter imposed on
Licensee's production, licensing, sale, transportation, import, export or use of the
Software or Licensee Programs, all of which shall be the responsibility of Licen-
see.
3. LIMITED WARRANTY
(a) DIMAC AB warrants that for one (1) year following delivery of the Software
to Licensee, the Software, unless modified in any way by Licensee, will perform
substantially the functions described in any associated product documentation pro-
vided by DIMAC AB. DIMAC AB does not warrant that the Software will meet Licen-
see's specific requirements or that operation of the Software will be uninterrupted
or error-free. DIMAC AB is not responsible for any problem, including any problem
which would otherwise be a breach of warranty, caused by :
* Changes in the operating characteristics of computer hardware or computer oper-
ating systems.
* Interaction of the Software with software not supplied or approved by DIMAC AB.
* Accident, abuse or misapplication.
41
EFTA00578356
w3 JMail
(b) DIMAC AB's entire liability and Licensee's sole remedy under the foregoing war-
ranty during the warranty period is that DIMAC AB shall, at its sole and exclusive
option, either use reasonable efforts to correct any reported deviation from the rel-
evant product documentation, replace the Software with a functionally equivalent
program or refund all license fees paid, in which case, this License shall immedi-
ately terminate. Any repaired or replaced Software will be rewarranted for an addi-
tional ninety (90) day period, unless sub-sequently modified by Licensee.
(c) The Above warranties are exclusive and no other warranties are made by DIMAC
AB or its licensors, whether expressed or implied, including the implied warranties
of merchantability, fitness for a Particular purpose, or non infringement.
4. LIMITATION OF LIABILITY
Under no circumstances shall DIMAC AB be liable for any incidental, special or
consequential Damages, even it DIMAC AB has been advised of the possibility of
such damages.
In no event shall DIMAC AB's total liability to Licensee for all damages, losses
and causes of action (whether in contract, tort (including negligence) or otherwise)
exceed the amount paid by Licensee for the Software.
5. BREACH AND TERMINATION
(a) This License is effective until terminated. This License may be terminated by the
non defaulting party if either party materially tails to perform or comply with this
License or any provision hereof.
(b) Termination due to a breach of Section 6 shall be effective upon notice. In all
other cases termination shall be effective thirty (30) days after notice of termina-
tion to the defaulting party it the defaults have not been cured within such thirty
(30) day period. The rights and remedies of the parties provided herein shall not
be exclusive and are in addition to any other rights and reme-dies provided by law
or this Agreement.
(c) Upon termination of this Agreement, all rights and licenses granted hereunder
shall immediately terminate and all Software and other Proprietary Information of
DIMAC AB in the possession of Licensee or under its control, shall be immediately
returned to DIMAC AB. End user licenses properly granted pursuant to this Agree-
ment and prior to termination of this Agreement shall not be diminished or abridged
by the termination of this Agreement.
6. GOVERNING LAW
This Agreement is governed by Swedish law and you submit to the jurisdiction of
the Swedish court in relation to any matter or dispute arising hereunder.
42
EFTA00578357
w3 JMail
7. NOTICE TO UNITED STATES GOVERNMENT END USERS
The Software and Documentation:
* Was developed with no government funds.
* Is a trade secret of DIMAC AB for all purposes of the Freedom of Information
Act.
* Are "Commercial Items", as that term is defined at 48 C.F.R. §2.101, consisting
of "Commercial Computer Software" and "Commercial Computer Software Docu-
mentation" as such terms are used in 48 C.F.R. §12.212 or 48 C.F.R. §227.7202,
as applicable. Consistent with 48 C.F.R. §12.212 or 48 C.F.R. §227.7202-1 through
§227.7202.4, as applicable, The "Commercial Computer Software" and "Commer-
cial Computer Software Documentation" are being licensed to U.S. Government
end users (i) only as "Commercial Items" and (ii) with only those rights granted to
all other end users pursuant to the terms and conditions herein.
For units of the Department of Defense (DOD), this Software is sold only with
"Restricted Rights" as that term is defined in the DOD Supplement to the Federal
Acquisition Regulations ("DFARS") 52.227-7013 (c)(1)(ii) and use, duplication or
disclosure is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the
Rights in Technical Data and Computer Software clause of DF ARS 52.227-7013.
Manufacturer: DIMAC AB.
Unpublished rights reserved under the copyright laws of Sweden.
Dimac AB, Garnisonsgatan 25 A. S-250 24 Helsingborg, Sweden
43
EFTA00578358
Document Preview
PDF source document
This document was extracted from a PDF. No image preview is available. The OCR text is shown on the left.
This document was extracted from a PDF. No image preview is available. The OCR text is shown on the left.
Extracted Information
Document Details
| Filename | EFTA00578316.pdf |
| File Size | 2633.2 KB |
| OCR Confidence | 85.0% |
| Has Readable Text | Yes |
| Text Length | 48,946 characters |
| Indexed | 2026-02-11T22:48:39.113176 |
Related Documents
Documents connected by shared names, same document type, or nearby in the archive.