GetContentID Method

Get inline file attachment's content-id.

[Syntax]
C++: HRESULT GetContentID( int nCount, BSTR* pVal )
Visual Basic: GetContentID( nCount As Long ) As String
C#: string GetContentID( int nCount )

Parameters

nCount

Ordinal number of file attachment. The minimum value is 1, the maximum value is returned by method GetAttachmentCount.

Return Value

If specified file attachment exists and is inline, the return value is the Content-ID of this attachment, otherwise the return value is null.

Usage Example

[ASP]
Dim oMsg, nCount
Set oMsg = Server.CreateObject("ANPOP.POPMSG")
If oMsg.ImportFile( "c:\test.eml" ) <> 0 Then
  Response.Write "error with ImportFile"
  Response.End
End If

nCount = oMsg.GetAttachmentCount()
For i = 1 To nCount
  Response.Write "Current attachment's content-id is " & oMsg.GetContentID(i)
Next

See Also

GetAttachmentCount Method
GetAttachmentChunk Method
GetAttachmentSize Method
SaveAttachment Method
SaveAttachmentAs Method


2001-2007 © Copyright AdminSystem Software Limited. All rights reserved.