ASP
Email Component

WebMailMan
Connects
to POP3 and SMTP servers to download or send email.
See
Also: WebEmail,
WebBundle
WebMailMan
Properties
POP3
Server Properties
SMTP Server Properties
Distribution Lists
Filter and Other Properties
POP3
Server Properties
[TOP]
- MailHost
As String read/write
- The hostname where
the POP3 server is located.
[TOP]
- MailPort
As Long read/write
- The port number
of the POP3 server. Only needs to be set if the POP3 server
is running on a non-standard port.
[TOP]
- PopPassword
As String read/write
- The password for
logging into the POP3 server.
[TOP]
-
- PopUsername
As String read/write
- The username for
logging into the POP3 server.
[TOP]
- ConnectTimeout
As Long read/write
- The maximum number
of seconds to wait when connecting to a POP3 or SMTP server.
The default is 5 seconds.[TOP]
- ReadTimeout
As Long read/write
- The maximum number
of seconds to wait for new data to arrive from the POP3 server.
A value of 0 (the default) sets the timeout to infinity. Setting
a reasonable timeout value will prevent your application from
hanging if the POP3 server stops responding.[TOP]
SMTP Server Properties
[TOP]
- SmtpHost
As String read/write
- The hostname of
the SMTP server used to send email. [TOP]
- SmtpPort
As Long read/write
- The port number
of the SMTP server used to send email. Only needs to be set
if the SMTP server is running on a non-standard port.[TOP]
- SmtpPassword
As String read/write
- The password for
logging into the SMTP server. Use this only if your SMTP server
requires authentication. Chilkat Mail supports the NTLM, LOGIN,
PLAIN, and CRAM-MD5 login methods, and it will automatically
choose the most secure method available. Additional login methods
will be available in the future. [TOP]
- SmtpUsername
As String read/write
- The login for logging
into the SMTP server. Use this only if your SMTP server requires
authentication. [TOP]
- SmtpLoginDomain
As String read/write
- The Windows domain
for logging into the SMTP server. Use this only if your SMTP
server requires NTLM authentication, which means your SMTP server
uses Integrated Windows Authentication. If there is no domain,
this can be left empty. [TOP]
- SmtpAuthMethod
As String read/write
- This property should
usually be left empty. The ChilkatMailMan will by default choose
the most secure login method available to prevent unencrypted
username and passwords from being transmitted if possible. However,
some SMTP servers may not advertise the authorization methods
it accepts to some or all clients, and therefore Chilkat Mail
cannot determine which authorization method to use. To force
a particular method to be used, or to prevent any authorization
from being used, set this property to one of the following values:
"NONE", "LOGIN", "PLAIN", "CRAM-MD5",
or "NTLM". [TOP]
Distribution
Lists
(TOP)
- SendIndividual
As Boolean read/write
- This property determines
how emails are sent to distribution lists.
If True, emails are sent to each recipient in the list one at
a time, with the "To" header field containing the
email address of the recipient. If False, emails will contain
<undisclosed-recipients> in the "To" header
field, and are sent to 100 BCC recipients at a time. As an example,
if your distribution list contained 350 email addresses, 4 emails
would be sent, the first 3 having 100 BCC recipients, and the
last email with 50 BCC recipients.
The default is value of this property is True.[TOP]
Filter and Other Properties
[TOP]
- AutoSaveCerts
As Long read/write
- Controls whether
certificates found in incoming signed emails are automatically
saved to the "Chilkat" certificate store. The default
is TRUE. The Chilkat cert store is located in the registry in
HKEY_LOCAL_MACHINE/Software/Chilkat/SystemCertificates.[TOP]
- AutoUnwrapSecurity
As Long read/write
- When an email is
downloaded from a POP3 server, or when it is loaded from a file,
WebMailMan automatically "unwraps" it if the email
is signed and/or encrypted. The results of the digital signature
verification and decryption can be accessed with the following
WebEmail properties and methods: EncryptedBy, SignedBy, ReceivedEncrypted,
and ReceivedSigned. The AutoUnwrapSecurity property controls
whether the automatic unwrap occurs or not. By default, this
property is set to 1, which enables the auto-unwrap. Setting
the property to 0 disables it, allowing for the S/MIME message
parts or envelopes to be saved or accessed.[TOP]
- Filter
As String read/write
- An expression that
is applied to any of the following method calls when present:
LoadXmlFile, LoadXmlString, LoadMbx, CopyMail, and TransferMail.
For these methods, only the emails that match the filter's expression
are returned in the email bundle. In the case of TransferMail,
only the matching emails are removed from the mail server. The
filter allows any header field, or the body, to be checked.
-
Here are some
examples of expressions:
- Body like "mortgage
rates*".
- Subject contains
"update" and From contains "chilkat"
- To = "info@chilkatsoft.com"
Here are the general rules for forming filter expressions:
- Any MIME header
field name can be used, case is insensitive.
- Literal strings
are double-quoted, and case is insensitive.
- The "*"
wildcard matches 0 or more occurances of any character.
- Parentheses
can be used to control precedence.
- The logical
operators are: AND, OR, NOT (case insensitive)
- Comparison
operators are: =, <, >, <=, >=, <>
- String comparison
operators are: CONTAINS, LIKE (case insensitive)
[TOP]
- MaxCount
As Long read/write
- Tells the mailman
to never read more than this many messages at a time from the
POP3 server. [TOP]
- SizeLimit
As Long read/write
- Tells the mailman
to not read any messages that are greater than this size in
bytes.[TOP]
- Version
As String read-only
- The version of
this ChilkatMail control. [TOP]
WebMailMan
Methods
Sending
Email
Receiving Email
Managing Email on the Server
Checking Servers
XML, EML, and MBX Import/Export
- GetInstanceLog()
As String
- Returns the log
in XML format for this object instance. The log is cleared when
this method is called.
- UnlockComponent(unlockCode
As String)
- Unlocks the mailman
object. An evaluation unlockCode can be obtained from the Chilkat
Software website at http://www.chilkatsoft.com. This method
must be called immediately after the mailman object has been
instantiated [TOP]
- Sending
Email
[TOP]
- QuickSend(from
As String, recipient As String, subject As String, body As String,
smtpHostname As String) As Long
- A quick way to
send an email to a single recipient without having to create
a WebEmail object explicitly. Returns 1 on successful delivery,
and 0 if failed. [TOP]
- RenderToMime(email
As WebEmail) As String
- When an email is
sent by calling SendEmail, it is first "rendered"
according to the values of the email properties and contents.
It may be digitally signed, encrypted, values substituted for
replacement patterns, and header fields "Q" or "B"
encoded as needed based on the email. The RenderToMime method
performs the rendering, but without the actual sending. The
MIME text produced is exactly what would be sent to the SMTP
server had SendEmail been called. (The SendEmail method is effectively
the same as calling RenderToMime followed by a call to SendRendered.[TOP]
- SendEmail(email
As WebEmail) As Long
- Send an email.
If mail was not successfully sent to any recipients, then an
error is raised. If mail was successfully sent to all recipients,
then a value of 1 is returned. If mail was successfully sent
to some, but not all of the recipients, then a value of 0 is
returned and no error is raised. In summary:
- Nobody got the
email: Function returns 0 and error is raised.
- Everybody got the
email: Function returns 1.
- Some, but not everyone,
got the email: Function returns 0, but error is not raised.
[TOP]
- SendBundle(bundle
As WebBundle) As Long
- Send a bundle of
emails. Return value:
- Nobody got any
emails: Function returns 0 and error is raised.
- Everybody got all
emails: Function returns 1.
- Some, but not everyone,
got the emails: Function returns 0, but error is not raised.
[TOP]
- SendMime(from
As String, recipients As String, mimeEmail As String) As Long
- Sends a pre-constructed
MIME-formatted email. The recipients and sender are specified
in the method parameters, and can be different than what is
specified in the email header fields. The output of WebEmail.GetMime
can be passed in to the last parameter of this method. Returns
1 for success and 0 for failure
- SendQ(email
As WebEmail) As Long
- Sends an email
via the Chilkat
smtpQ service. Returns 1 for success and 0 for failure.
- SendRendered(mimeText
As String) As Long
- Connects to the
SMTP server and sends an email by transmitting the MIME text
exactly as specified in the parameter. The recipients are determined
by the "To" and "CC" header fields in the
MIME text. Returns 1 for success and 0 for failure.[TOP]
Receiving
Email
[TOP]
- CheckMail()
As Long
- Return the number
of emails on the POP3 server. Returns -1 if unable to check
the POP server for any reason.
[TOP]
- CopyMail()
As WebBundle
- Copy the mail from
a POP3 server into a WebBundle. This does not remove the email
from the POP3 server. [TOP]
- TransferMail()
As WebBundle
- Transfer the emails
from the POP3 server into a WebBundle. [TOP]
- FetchEmail(uidl
as String) As WebEmail
- Fetches an email
from the mail server given its UIDL. The email is left on the
mail server. A typical program might get the email headers from
the mail server by calling GetAllHeaders or GetHeaders,
and then fetch individual emails via their UIDL properties one
at a time. (In version 2.1, WebEmail has a Uidl property.) [TOP]
- FetchMultiple(uidlArray
as CkStringArray) As WebBundle
- Given an array
of UIDL strings, this method fetchs all the emails from the
mail server whose UIDL is present in the array, and returns
the emails in a bundle. See CkStringArray
for information regarding that object. [TOP]
- GetAllHeaders(numBodyLines
as Long) As WebBundle
- Returns all the
emails from the mail server, but only the first numBodyLines
lines of the body. Attachments are not returned. The emails
returned in the WebBundle are valid WebEmail objects, the only
difference is that the body is truncated to include only the
top numBodyLines lines. [TOP]
- GetFullEmail(email
as WebEmail) As WebEmail
- If a partial email
was obtained using GetHeaders or GetAllHeaders,
this function will take the partial email as an argument, and
download the full email from the server. A new WebEmail object
(separate from the partial email) is returned. [TOP]
- GetHeaders(numBodyLines
as Long, fromIndex as Long, toIndex as Long) As WebBundle
- The same as the
GetAllHeaders method, except only the emails from fromIndex
to toIndex on the mail server are returned. The first
email on the server is at index 0. [TOP]
Managing
Email on the Server
[TOP]
- DeleteEmail(email
As WebEmail)
- Removes an email
from the mail server. The email argument is an email
that was previously downloaded from the mail server, either
in its entirety, or partially (as with GetAllHeaders
or GetHeaders). [TOP]
- DeleteBundle(bundle
As WebBundle)
- Removes all the
emails present in the bundle from the mail server. [TOP]
- DeleteMultiple(uidlArray
As CkStringArray)
- Removes from the
mail server any email that has a UIDL equal to one of the UIDLs
in the array. See CkStringArray
for information regarding that object. [TOP]
- GetUidls()
As CkStringArray
- Returns the UIDLs
of the emails currently stored on the POP3 server.[TOP]
- Checking
Servers
[TOP]
- VerifyPopConnection(void)
As Long
- Returns 1 if a
connection can be made to the POP server, otherwise returns
0. [TOP]
- VerifyPopLogin(void)
As Long
- Attempts to login
to the POP server and returns 1 if successful, otherwise returns
0. [TOP]
- VerifySMTPConnection(void)
As Long
- Returns 1 if a
connection can be made to the SMTP server, otherwise returns
0.[TOP]
- VerifySMTPLogin(void)
As Long
- Attempts to login
to the SMTP server and returns 1 if successful, otherwise returns
0. [TOP]
XML,
MIME, EML, and MBX Import/Export
[TOP]
- LoadEml(filename
As String) As WebEmail
- Creates a WebEmail
object from an EML (MIME) file.[TOP]
- LoadMbx(filename
As String) As WebBundle
- Loads a .mbx file
containing emails and returns an email bundle. If a Filter is
present, only emails matching the filter are returned.[TOP]
- LoadMime(mimeText
As String) As WebEmail
- Creates a WebEmail
object from MIME text. [TOP]
- LoadXmlEmail(filename
As String) As WebEmail
- Loads an XML file
containing a single email and returns a WebEmail object. [TOP]
- LoadXmlEmailString(xmlText
As String) As WebEmail
- Loads an XML string
containing a single email and returns a WebEmail object. [TOP]
- LoadXmlFile(filename
As String) As WebBundle
- Loads an XML file
containing emails and returns an email bundle. If a Filter is
present, only emails matching the filter are returned. [TOP]
- LoadXmlString(xmlData
As String) As WebBundle
- Loads from an XML
string containing emails and returns an email bundle. If a Filter
is present, only emails matching the filter are returned. [TOP]
|
Privacy
Statement. Copyright 2000-2012 Chilkat
Software, Inc. All rights reserved.
(Regarding the usage of the Android logo) Portions of this page are reproduced from work created and shared by Google
and used according to terms described in the Creative Commons
3.0 Attribution License.
Send feedback to support@chilkatsoft.com
Software components and libraries for Linux, MAC OS X, IOS (IPhone), Android™, Solaris, RHEL/CentOS Microsoft Windows 7, Vista, XP, 2000, 2003 Server, 2008 Server, and Windows 95/98/NT4.
|
|