Use W3 Jmail to implement mail sending solutions
Hainan Provincial Commercial Information Service Center Wen Wen
W3 Jmail Mail Components is the use of DIMAC's development, reception, encryption, and cluster transmission such as DIMAC. W3 Jmail Components are one of the most popular mail components. Most of the ASP programmers in the world are using the W3 Jmail component to build a mail sending system, which is because W3 Jmail components use new kernel technology to make them more reliable. And stable.
First, introduce the reader to the reader's new feature of the W3 JMail4.3 component:
1. W3 JMail4.3 Components Redes its internal structure - use the Message object instead of the original single object Jmail.smtpmail sends mail;
2, W3 JMail4.3 Components There are more than ten objects (later described in detail) - Most of these objects are for Jmail.Message objects;
3. Support from the POP3 mail server to charge the mail;
4, support the transmission of encrypted mail;
5, quickly send, a session complete the email transmission;
6, there is also a feature that you can use a cluster sending function of W3 Jmail4.3 components to send thousands of messages at a time, and you can personalize your mail via a mail merge (MailMerge).
Second, the installation and uninstall of JMAIL mail components:
1, installation
Like other components, you should install or register the component Jmail.dll before using the JMAIL mail component. The specific registration method is to copy the Jmail.dll file to a directory of the hard disk (such as c: /jmail/jmail.dll), then execute the command regsvr32 c: /jmail/jmail.dll.
2, uninstall
The unloading component is the opposite action of the installation component, you can use parameter / u to uninstall the installed components, execute the command regr32 / u jmail.dll.
Third, detail the object of the W3 Jmail component (12):
1, .pop3 object
Attributes (or methods)
Description
Connect (Username, Password, Server, Port)
Connect the POP3 server, the fracture is optional, default 110.
DeleteMessages ()
Delete all messages from the mail server.
DELETESINGLEMESSAGE (MESSAGEID)
Delete the message specified by the messageId from the mail server.
Disconnect ()
Close the connection to the mail server.
Downloadheaders ()
Read all the email headers from the mail server and pass it to the Messages collection.
DownloadMessages ()
Read all messages from the mail server.
DownloadSingleHeader (MessageID)
Read the specified message header from the mail server and pass it to the Messages collection.
DownloadunReadMessages ()
Read all unread messages from the mail server.
2, .messages object
Attributes (or methods)
Description
Clear ()
Clear all the contents in the collection does not delete any emails on the mail server.
Count (): Integer
Returns the number of records in the collection: i = Messages.count
Item (INDEX): Pointer
Returns a Message object. Set omsg = messages.item (0)
3, .message object
Attributes (or methods)
Description
Addattachment (FileName, Isinline, ContentType): String
Add a file type attachment to the email. When Isinline is set to True, the added attachment is an embedded attachment.
AddCustomAtTachment (filename, data, isinline): String Adds a custom type attachment to your email.
AddHeader (Xheader, Value)
Add a custom email header X-header to the email.
AddnativeHeader (Header, Value)
Add a mail head to the email.
AddRecipient (EmailAddress, RecipientName, PGPKey)
Add a recipient to the email. RecipientName and PGPKey are optional, RecipientName is encrypted by the recipient name, PGPKey gives mail.
AddRecipientBCC (EmailAddress, PGPKey)
Add a Mail Deliver (BCC) address.
AddRecipientcc (EmailAddress, RecipientName, PGPKey)
Add a mail Cc. (CC) address to the email.
Addurlattachment (Bstrurl, Bstrattachas, Isinline, Bstrauth): String
Download files from the specified URL and add it as a mail attachment. Parameters Bstrattachas are used to change file names added to mail attachments.
Appendbodyfromfile (filename)
Clear the text body and use the contents of the specified file as the body.
Appendhtml (Text)
Add HTML format text from the message, as shown in the example: message. Appendhtml ("
AppendText (Text)
Add a text text to the email.
Clear ()
Clear all mail messages is an empty object.
Clerattachments ()
Clear the list of attachments. Message.clerattachments
ClearcustomHeaders ()
Clear all custom mail headers.
ClearRecipients ()
Clear all recipients list.
Close ()
Release Jmail and a cache used by the mail server connection.
DecodeHeader: String
Output a mail head message.
ExtractemailAddresseSFromurl (BSTRURL, BSTRAUTH)
Read and add a mailing list from the specified network system (URL).
GetMessageBodyFromurl (same)
Delete the message body and replaced with the contents of the specified URL.
KeyInformation (KeyIdentifier): Pointer
Returns a PGPKEY object.
LoadFromstream (stream)
Read the data from the database flow, the database stream must comply with the RFC822 standard.
LogcustomMessage (MESSAGE)
Add a custom log for the Jmail log file. This function is only valid when the Logging property is set to True.
NQ ()
Add a message to the send queue waiting to be sent.
PARSEMESSAGE (MESSAGESOURCE)
Analysis of an email, the data stream must comply with the RFC822 format standard.
SaveTostream (stream)
Save the mail to the data stream, the data stream must comply with the RFC822 format standard.
Send (MailServer, Enque): Boolean
send email. The mail server is a string that describes the mail server name or address is optional. Use the format when you want to send authentication emails: Username: Password @ Mail Server
SendtonewsGroup (ServerName, NewsGroup)
Use the specified NNTP server to send an email to the newsgroup, multiple messages are separated.
About (): String
Set some additional information. Attachments (): Pointer
Returns the attachment collection of the message. Set attachments = message.attachments
Body (): String
Return to the body of the message. Response.write (Message.Body)
(Endlessly)