ListManager.AddUserToMailingList Method (PIA)
Use this method to add a user record to a Mailing list.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Targeting
…
Public Sub AddUserToMailingList(listID As Object,
UserEmail As Object,
Optional UserGUID As Object,
Optional UserFmt As Object,
Optional UserLocale As Object,
Optional UserUrl As Object)
[C#]
using Microsoft.CommerceServer.Interop.Targeting;
…
public void AddUserToMailingList(objectlistID,
objectUserEmail,
objectUserGUID,
objectUserFmt,
objectUserLocale,
objectUserUrl);
Parameters
[Visual Basic .NET]
- listID
An Object that contains ID or name of the list. - UserEmail
An Object that contains the e-mail address of the user. - UserGUID
An optional Object that contains the ID of the user (usually a GUID). - UserFmt
An optional Object that contains the message format flag. See the Remarks section for more information. - UserLocale
An optional Object that contains the preferred character set of the user. - UserUrl
An optional Object that contains a URL used for retrieving personalized content for the user.
[C#]
- listID
An object that contains the ID or name of the list. - UserEmail
An object that contains the e-mail address of the user. - UserGUID
An object that contains the ID of the user (usually a GUID). - UserFmt
An object that contains the message format flag. See the Remarks section for more information. - UserLocale
An object that contains the preferred character set of the user. - UserUrl
An object that contains a URL used for retrieving personalized content for the user.
Exceptions
This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.
[Visual Basic .NET]
The following table shows the custom COM errors that a COMException can wrap.
Value | Description |
---|---|
&H8C400008 | The specified list is currently busy with another operation. |
&H8C40001D | The specified list is in a FAILED state and may not be used for the operation. |
&H8C400006 | The specified list does not exist. |
&H8C40000D | The list is designated as a Mailable list but does not contain an rcp_email column. |
&H8C400019 | The operation requires a static list and the specified list is dynamic. |
&H8C400018 | The operation requires a Mailing list and the specified list is not a mailing list. |
&H8C400003 | Error while executing SQL/ADO operation. |
&H8C40000E | The list is designated as a User list but does not contain an rcp_guid column. |
&H80040007 | The ListManager object has not been properly initialized. |
Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
[C#]
The following table shows the custom COM errors that a COMException can wrap.
Value | Description |
---|---|
0x8C400008 | The specified list is currently busy with another operation. |
0x8C40001D | The specified list is in a FAILED state and may not be used for the operation. |
0x8C400006 | The specified list does not exist. |
0x8C40000D | The list is designated as a Mailable list but does not contain an rcp_email column. |
0x8C400019 | The operation requires a static list and the specified list is dynamic. |
0x8C400018 | The operation requires a Mailing list and the specified list is not a mailing list. |
0x8C400003 | Error while executing SQL/ADO operation. |
0x8C40000E | The list is designated as a User list but does not contain an rcp_guid column. |
0x80040007 | The ListManager object has not been properly initialized. |
Remarks
The UserFmt parameter specifies the format of a message used by Direct Mailer. The possible values are: text (1), MIME (2), and MHTML (3).
To specify that one or more of the fields should be inserted as Null, pass DBNull.Value as the parameter(s).
[Visual Basic .NET]
Example
oListManager.AddUserToMailingList ("{2B544800-4169-4C49-8713-1B794078B4C9}", _
"JaneUser@somewhere.com", "{454799A2-312B-4F5F-90A0-F514FBA0EC5A}", _
2, 1033, DBNull.Value)
Requirements
Namespace: Microsoft.CommerceServer.Interop.Targeting
Platforms: Windows 2000, Windows Server 2003
Assembly: listmanagerlib (in listmanagerlib.dll)
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.