ASPMAIL components use help

xiaoxiao2021-03-06  59

ASPMAIL Components Use Help Write in front, the following manuals, all the additional functional parts have 30 days of use limitations, the way to relieve this limit is as follows: If you get the "Aspemail's Premium Features Have Expired" error message, please run regedit, Delete HKEY_LOCAL_MACHINE / SOFTWARE / PERSITS SOFTWARE / SOFTWARE / PERSITS SOFTWARE / AspeMail and then re-register aspemail using with Regsvr32. Then you can then use the ASPEMAIL 4.1 in 30 days is an activity service component that sends an email message using an external SMTP server in an ASP or VB environment. Aspemail 4.1 supports multi-recipients, multi-CC, multi-BCC, multi-accessories, HTML formats, embedded graphics, and non-US ASCII character sets. Aspemail 4.1 is a completely free component, except in embedded graphics, Quoted-Printable The encoding support function, the message queue function requires another purchase license to download this complete free aspemail can be downloaded at www.aspemail.com. System requirements: General configuration requirements: Windows 95/98 or Windows NT 4.0 A special configuration requirement: Internet Information Server 3.0 and Active Server Pages or Personal Web Server (any version) and Active Server Pages or Retones or RAGSONAL PAGES, or ACTIVE SERVER PAGES or How does Visual Basic, Visual C , other development environments that support COM components? First, you need to register aspemail on your system, perform the following commands in your MS DOS or Start / Run: C: /> Regsvr32 C: /ASPemAildIr/aspemail.dllaspemail is the aspUpload (Persits Software, Inc.) component The evaluation release is released. The component is used to upload the attachment file to the server. (Translator Note: Of course, aspmail can also be used separately) Register AspUPload to perform the following command: c: /> regsvr32 c: /asplandir/aspupload.dllaspUPload does not need Run Aspemail. However, asp Sendmail examples published together with Aspmail are used in the ASPUPLOAD.

So if you need to use this example, please register aspupload (you can learn more detailed information, but it is not free). How to use Aspemail in the ASPEMAIL code as follows: < % ... set mail = server.createObject ("Persits.mailsender") ...%> The code using Aspmail in the VB environment is as follows, first go to Project / References ... in Persits Software Aspemail 4.1.dim Mail as mailsenderset mail = new mailsendermail.host = "smtp.mycompany.com" mail.port = 25mail.from = "sales@mycompany.com" mail.fromname = "sales department" 'optional If you want to add messages People, CCS, BCCS, and Reply-To, use addAddress, addcc, addbcc and addreplyto methods. These methods have two input parameters: email address and optional parameters name.mail.addaddress "jsmith@company1.com "," John Smith "mail.addcc" bjohnson@company2.com "'Name is an optional Subject and Body property to specify the subject and message body of the message separately. The body can be plain text or HTML format. If you want to use the HTML format, you must set the ISHTML property to true. For example, mail.subject = "Sales Receipt" mail.body = "dear john:" & chr (13 ) & chr (10) & "Thank you for your business." or mail.subject = "Sales Receipt" mail.body = "dear john: ...." mail.ishtml = true if it is To send a file attachment, use the AddAtTachment method. It uses the absolute path of the attachment to input parameters. If you have multiple attachments, you can call this method multiple times. Note: Do not use "=" to deliver the parameter mail.addattachment "c: /dir/receipt.doc" send message is called the Send method. This method is wrong when an exception occurs. You should choose to intercept this error message, this can be implemented using the ON Error Resume nextmail.sendif Err <> 0 ThenRESPONSE.WRITE "an error Occurred:" & Err.DescriptionEND IF support based on S / MIME Encryption and Digital Electronic Sign Starting from the Build 4.0.0.3, Aspemail can generate a password and digital electronic signature based on industrial standard S / MIME format. If you want to send a secret message, Aspemail must be with the AspenCrypt password component (also Persits Software, INC. Get a joint use.

If you want to know more, you can download the free AspenCrypt trial version www.aspencrypt.com extra characteristics (not free): Support Queue message Aspemail If you use basic features (that is, the function above) It is completely free. But its additional feature requires you to buy a registration license (of course you can also use it for free for 30 days.). You can purchase this stuff at www.aspemail.com. AspeMail 4.1 has a new method SendToqueue, which is not sent directly to the SMTP server but puts the message in a queue in the order, and the queue is sent by the EmailAgent NT service. This is a background running process. You don't have to wait until you send the email to end. This means that you will greatly improve the efficiency of your code and shorten the client waiting time. The EmaiLagent service itself is completely free, you can download at www.aspemail.com/download.html. But just sendToqueue method needs to purchase a registered key after you use 30 days. Additional Features: Use embedded graphics Send Messages Aspemail to send an email containing graphics. Examples are as follows: (This example sends an email with background graphics) ... mail.body = ... "mail.addembeddedImage" C: /ASPEMAILDIR/Margin.gif "," My-Background-Image "addEmbeddedImage method has two input parameters: the absolute path of the graph file and the Content ID (is a string variable) the variable format is as follows:" CID: "

In the example, the content ID is "My-Background-Image" is used to reference the flag's Background property. You can use the same technology to

Use this feature in the logo, as follows:

Mail.body = "....

"

Mail.addembeddedImage "C: /aspemaildirl/logo.gif", "My-Company-logo"

In order to make your script readability, you can choose to put your message text in a separate file, then use the appendbodyfromfile method to join the body. For example:

Body {Color: # 427d64; font-family: "arial"; font-size: 12pt; margin-left: 8em}

Thank you for shopping atur Online Store!

....

To use the above file in your text, the code is as follows:

Mail.appendbodyfromfile "c: /aspemaildir/messagebody.html"

Mail.addembeddedImage "c: /aspemails", "my-background-image"

Additional Features: Support non-US-ASCII character set

Aspemail can send a non-US-ASCII character set, as long as it is a format that can be printed.

That is, the format is described in detail in standard RFC-2045. That is to say, the ASC code can be less than 33 and greater than 126 can be represented as "=" and add two 16-based numbers. For example, 10 en-value value 12 (Change page symbol in US-ASCII) is represented as "= 0c", 10) value 61 ("=" character) in US-ASCII is represented as "= 3d" .aspemail automatic message body according to quote -Printable format is encoded, such as the ContentTransferencoding property

Set to "quoted-printable". You can also set the charset property to the appropriate character set

The following code snippet sends a text file using the Russian of the KOI8 character set (this file is not displayed here):

...

Mail.contentTransferencoding = "quoted-printable"

Mail.charset = "koi8-r"

Mail.appendbodyfromfile "c: /russiandoc.txt"

Mail.send

ASP example

Follow the Aspemail released there is an ASP example, which allows you to build and send an attachment to an attachment via the web.

This example consists of several files:

Global.asa (Collection Object Creation)

Sendmail.asp (Main Email Interface Page)

Attachments.asp (Attachment Handling Page)

UploadScript.asp (Upload Script Which Uses Aspupload).

To use this example correctly, please register the ASPUPLOAD component trial version correctly.

Object help

Attributes and attributes of Aspemail

Property Name Property Type Notes

Host String host name of the SMTP server

The port number of Port Integer SMTP is default 25.

From string (must) sender Email Address

Fromname string sender's name

Subject string theme

The body of the body string message can be text or HTML format. If it is the latter, then the attribute ISHTML must be true.

The ISHTML Boolean default value is false. If set to true, aspemail will set the content-type portion of the message as text / html.

Priority Integer's priority. The legal value is 1 (height), 3 (ordinary) and 5 (bottom). The default is 0 (ie, no priority).

The Helo String default value is "aspemail". This string is sent with the helo command when the SMTP dialog is started. The client used to SMTP identify the domain name of the SMTP server.

转载请注明原文地址:https://www.9cbs.com/read-117208.html

New Post(0)