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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access