Name

SetLocaleIDs (NewMail Object) — objNewMail .SetLocaleIDs( lngCodePageID )

Synopsis

Sets the message sender's locale. This locale setting controls how certain internal features of the message, such as dates, will be evaluated.

Parameters

lngCodePageID

A required Long value that represents the code page identifier for the message

Example

<%

' Dimension local variables.
Dim objNewMail
Dim strRecipList
Dim lngChineseCodePage 950

' 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."

' Set the LocaleID to that of Chinese for this message.
lngChineseCodePage = 950
objNewMail.SetLocaleIDs lngChineseCodePage
. . . [additional code]

%>

Notes

The LocaleID setting for a sender's message indicates how the sender's machine formats dates and times. It also dictates the character selection for the page. You can obtain the current CodePage for a WinNT system by calling the GetCPInfo API function.

If you do not use this method to set a LocaleID, your messaging system assumes that your message should use the value stored for this property in your system registry.

The SetLocaleIDs method will check the validity of your argument before setting the Locale ID for the current message.

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.