Name
ContentBase —
objNewMail
.
ContentBase =
strContentBase
Synopsis
A string representing the base for all URLs referenced within the body of the message content. This property is used only for MIME HTML (for more information on MHTML, see RFC 2110). The ContentBase property represents the URL on which all relative URLs in the HTML section of the body are based.
Parameters
-
strContentBase A string containing a base URL for all URLs in the content HTML for the current message
Example
The following example demonstrates the use of the ContentBase property in conjunction with the ContentLocation property (see the entry for the ContentBase property):
<% ' Dimension local variables. Dim objNewMail Dim strBodyContent ' Instantiate a NewMail object. Set objNewMail = Server.CreateObject("CDONTS.NewMail") ' Set the body string for the message. strBodyContent = "<HTML><HEAD><TITLE>" strBodyContent = strBodyContent & "My HTML Content" strBodyContent = strbodyContent & "</TITLE></HEAD><BODY>" strBodyContent = strBodyContent & "Here is an excellent image:" strBodyContent = strBodyContent & "<BR>" strBodyContent = strBodyContent & "<IMG SRC = "TodaysPic.jpg">" strBodyContent = strBodyContent & _ "<BR>I hope you like today's picture.</BODY>" ' Set the ContentBase and ContentLocation so the messaging ' system knows how to resolve the simple URL in the preceding ' image tag. objNewMail.ContentBase = "http://www.MyPrimarySvr.com/" objNewMail.ContentLocation = "graphics/dailypics/" ' Now the preceding ...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