Properties
|
About() :
|
Some useful information.
'Response.Write( Message.About )'
|
|
Attachments() :
|
Returns the Attachments
collection.
'set attachments = Message.Attachments'
|
|
Body() :
|
Returns the body
of the message.
'Response.Write( Message.Body )/pMessage.Body = "Hello world!"'
|
|
BodyText() :
|
Returns the entire
raw unparsed body ( Text - Headers.Text ).
'Response.Write( Message.BodyText )'
|
|
Charset() :
|
The charset of the
message. The default is "8859-1".
'Message.Charset = "US-ASCII"'
|
|
ContentTransferEncoding() :
|
Specifies the content
transfer encoding. The default is "Quoted-Printable".
'Message.ContentTransferEncoding = "base64"'
|
|
ContentType() :
|
Returns the body's
Content Type.
'Response.Write( Message.ContentType )'
|
|
Date() :
|
Returns the DateTime
when the message was sent.
'Response.Write( Message.Date )'
|
|
DeferredDelivery() :
|
Sets deferred delivery
of messages. If the mail server supports it the message will
not be delivered until this date and time.
'Message.DeferredDelivery = CDate( "2000-12-12" )'
|
|
Encoding() :
|
This can be used
to change the default attachment encoding from base64. Valid
options are "base64" or "quoted-printable".
'Message.Encoding = "base64"'
|
|
EncryptAttachments() :
|
Set to TRUE all
attachments will be encrypted too if encryption is enabled.The
default value is TRUE.
'Message.EncryptAttachments = true'
|
|
ErrorCode() :
|
Contains the error
code if message.silent is set to TRUE.
'Response.Write( message.ErrorCode );'
|
|
ErrorMessage() :
|
Contains the error
message if message.silent is set to TRUE.
'Response.Write( message.ErrorMessage );'
|
|
ErrorSource() :
|
Contains the error
source if message.silent is set to TRUE.
'Response.Write( message.ErrorSource );'
|
|
From() :
|
The senders e-mail
address.
'Response.Write( Message.From )/pMessage.From = "kyle@twinpeaks.com"'
|
|
FromName() :
|
The sender's name.
'Response.Write( Message.FromName )/pMessage.FromName = "John Doe"'
|
|
Headers() :
|
Returns the Headers
object.
'set Headers = Message.Headers'
|
|
HTMLBody() :
|
Used to set and
get the HTML part of the message body (if any).
'Message.HTMLBody = "<html><body>Hello<br></body></html>"'
|
|
ISOEncodeHeaders() :
|
Encodes header strings
according to iso-8859-1 character sets. The default is TRUE.
'Message.ISOEncodeHeaders = false'
|
|
Log() :
|
This is the log
created by w3 JMail when logging is set to TRUE.
'Response.Write( Message.Log );'
|
|
Logging() :
|
Enables/Disables
logging in w3 JMail.
'Message.Logging = true'
|
|
MailData() :
|
The raw maildata
as the email will look like when it is delivered.
'Response.write( Message.MailData )'
|
|
MailDomain() :
|
This can be used
to override the EHLO/HELO statement to your mail server.
'Message.Maildomain = "hello.world.com"'
|
|
MailServerPassWord() :
|
Used to specify
the password for SMTP server authentication if the mail-server
requires a user to log in.
'Message.MailServerPassword = "myPassword"'
|
|
MailServerUserName() :
|
Used to specify
the username for SMTP server authentication if the mail-server
requires a user to log in.
'Message.MailServerUserName = "myUserName"'
|
|
MimeVersion() :
|
Specifies the mime
version. The default is "1.0".
'Message.MimeVersion = "1.0"'
|
|
MsPickupdirectory() :
|
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.MsPickupdirectory = "c:\myfolder"'
|
|
PGPEncrypt() :
|
Set to TRUE, the
e-mail will be encrypted when the message is sent, using PGP.
'Message.PGPEncrypt = true'
|
|
PGPPassphrase() :
|
The PGP passphrase
used when signing.
'Message.PGPPassPhrase = true'
|
|
PGPSign() :
|
Set to TRUE, the
e-mail will be signed when the message is sent, using PGP.
'Message.PGPSign = true'
|
|
PGPSignkey() :
|
An e-mail address
or a PGP key id identifying the key to be used for signing.
'Message.PGPSingKey = "charlie@hisdomain.com"'
|
|
Priority() :
|
Returns the Message's
priority. 3 is normal priority.
'Response.Write( Message.Priority )/pMessage.priority= 2'
|
|
Recipients() :
|
Returns the Recipients
collection.
'set recipients = Message.Recipients'
|
|
RecipientsString() :
|
Readonly property
of all recipients of this message.
'Response.Write( Message.Recipients )'
|
|
ReplyTo() :
|
Specifies an optional
reply address.
'Message.ReplyTo = "president@dimac.net"'
|
|
ReturnReceipt() :
|
Specifies whether
or not the sender requires a return receipt. The default value
of the property is FALSE.
'Message.ReturnReceipt = true'
|
|
Silent() :
|
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.silent = true'
|
|
SimpleLayout() :
|
Set to TRUE to reduce
the number of headers w3 JMail produces.
'JMail.SimpleLayout = true'
|
|
Size() :
|
Returns the total
size of the message in bytes.
'Response.Write( Message.Size )'
|
|
Subject() :
|
the subject of the
message.
'Response.Write( Message.Subject )/pMessage.subject = "w3 JMail rocks!"'
|
|
Text() :
|
Returns the entire
message source.
'Response.Write( Message.Text )'
|
|
UsePipelining() :
|
Overrides if w3
JMail should use pipelining on a server that supports it.
'Message.Pipelining = false'
|
|
Version() :
|
Returns version
information.
'Response.Write( Message.Version )'
|
|
|
Methods
|
AddAttachment(FileName,
isInline, ContentType) :
|
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 emails.
'Message.AddAttachment("c:\autoexec.bat")/pcid = Message.AddAttachment("myImage.gif", TRUE)'
|
|
AddCustomAttachment(FileName,
Data, isInline) :
|
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
emails.
'Message.AddCustomAttachment("readme.txt", "Contents of file")'
|
|
AddHeader(XHeader,
Value) :
|
Adds a user defined
X-header to the message.
'Message.AddHeader "Originating-IP","193.15.14.623"'
|
|
AddNativeHeader(Header,
Value) :
|
Adds a header to
the message
'Message.AddNativeHeader "MTA-Settings", "route"'
|
|
AddRecipient(emailAddress,
recipientName, PGPKey) :
|
Adds a recipient
to the message.
'JMail.AddRecipient "info@dimac.net"'
|
|
AddRecipientBCC(emailAddress,
PGPKey) :
|
Adds a blind carbon
copy recipient to the message. AddRecipientBCC can be used multiple
times for several recipients. RecipientName and PGPKey are optional.
PGPKey will default to the e-mail address value.
'Message.AddRecipientBCC "info@dimac.net"'
|
|
AddRecipientCC(emailAddress,
recipientName, PGPKey) :
|
Adds a carbon copy
recipient to the message. AddRecipientCC can be used multiple
times for several recipients. RecipientName and PGPKey are optional.
PGPKey will default to the e-mailaddress value.
'Message.AddRecipientCC "info@dimac.net"'
|
|
AddURLAttachment(bstrURL,
bstrAttachAs, isInline, bstrAuth) :
|
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 WWW-Authentication.
'Message.AddURLAttachment("http://download.dimac.net/jmail/w3jmail4.exe", "w3jmail4.exe")/pMessage.AddURLAttachment ("http://download.dimac.net/jmail/w3jmail4.exe", "w3jmail4.exe",false, "myUserName:myPassword")/pcid = Message.AddURLAttachment ("http://images.dimac.net/dimaclogo.gif", "dimaclogo.gif",true)'
|
|
AppendBodyFromFile(FileName) :
|
Clears the body
of the message and replaces it with the contents of the file.
'Message.AppendBodyFromFile "c:\mytext.txt"'
|
|
AppendHTML(Text) :
|
Append "text" to
HTMLBody of message.
'Message.AppendHTML("<h4>Hello</h4>")'
|
|
AppendText(Text) :
|
Append "text" to
body.
'JMail.AppendText "Text appended to message body"'
|
|
Clear() :
|
Clears the message
object and gives you a new clean message.
'Message.Clear'
|
|
ClearAttachments() :
|
Clears the list
of attachments.
'Message.ClearAttachments'
|
|
ClearCustomHeaders() :
|
Clears all custom
headers.
'Message.ClearCustomHeaders'
|
|
ClearRecipients() :
|
Clears the recipient
list.
'Message.ClearRecipients'
|
|
Close() :
|
Forces w3 JMail
to close a cached connection to a mail server.
'Message.Close();'
|
|
DecodeHeader(Header) :
|
Decodes a message
header.
'Response.Write( Message.DecodeHeader( Headers["ReplyTo"] ) )'
|
|
ExtractEmailAddressesFromURL(bstrURL,
bstrAuth) :
|
Downloads and adds
e-mail addresses from a URL.
'Message.ExtractEmailAddressesFromURL "http://duplo.org/generateEmailList.asp"'
|
|
GetMessageBodyFromURL(bstrURL,
bstrAuth) :
|
Clears the body
of the message and replaces it with the contents of the URL.
The content type is automaticly set to match the content type
of the URL. The second argument (login and password) is optional.
'Message.GetMessageBodyFromURL "http://duplo.org/", "login:password"'
|
|
KeyInformation(keyIdentifier) :
|
Returns a PGPKey
object holding information for the keys matching the supplied
identifier.
' keys = Message.KeyInformation("charlie@hisdomain.com")'
|
|
LoadFromStream(Stream) :
|
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.
'Message.nq'
|
|
ParseMessage(MessageSource) :
|
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) :
|
Sends the message.
Mailserver 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( "myMailServer" )/pMessage. Send("myUserName:mypassword@mymailserver.mydomain.com")'
|
|
SendToNewsGroup(ServerName,
Newsgroups) :
|
Sends the message
to Newsgroups (separated by a ",") using the NNTP server
specified.
'SendToNewsGroup myNNTPServer, "alt.test, alt.test.test"'
|
|
VerifyKeys(keyString) :
|
Returns TRUE if
ALL the supplied keys where found in the local keyring.
'JMail.VerifyKeys "recipient1@hisdomain.com,recipient2@hisdomain.com
|