Name
AttachURL —
objNewMail
.AttachURL
(strSource
[, strContentLocation
] _
[, strContentBase
] [, lngEncodingSetting
] )
Synopsis
Associates a URL with the attachment embedded in your message.
Parameters
-
strSource
A string containing the pathname and filename for the file that you want to embed in your message
-
strContentLocation
A string containing a relative or absolute path for all URLs in the content HTML for the current message
-
strContentBase
A string containing a base URL for all URLs in the content HTML for the current message
-
lngEncodingSetting
A Long parameter that can contain either of the following CDO constants:
-
CdoEncodingUUEncode (0)
The attachment you embed in your message will be encoded in the UUEncode format. This is the default value.
-
cdoEncodingBase64 (1)
The attachment you embed in your message will be encoded in the base 64 format.
-
Example
<% ' Dimension local variables. Dim objNewMail Dim strRecipList ' Instantiate a NewMail object. Set objNewMail = Server.CreateObject("CDONTS.NewMail") ' Set the body string for the message. objNewMail.Body = _ "Wow, this message takes just a few lines of code." ' Attach an attachment to your file and associate a URL ' with it. objNewMail.AttachURL "Proposal.htm", "htmdocs/april/", _ http://www.mysvr.com/graphics/, cdoEncodingBase64 ' Send the message. For details about the Send method, ' see tha section in this chapter. objNewMail.Send "me@here.com","you@there.com", _ "This is the subject",,cdoHigh %>
Notes
The AttachURL method allows ...
Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.