GetPureAddr Method


Extracts and returns the pure e-mail address (e.g. jdoe@domain.com) from the specified full e-mail address (e.g. John Doe <jdoe@domain.com>). If multiple e-mail addresses specified, they must be delimited with commas.

For example, if FullAddr parameter is as following: "Mr. X, Y Company"<mr.x@y.com> (y.com), nofriendlyname@localhost, someone@host.net (Only comment)

then GetPureAddr will return: mr.x@y.com, nofriendlyname@localhost, someone@host.net


strPureAddr = ObjectName.GetPureAddr(FullAddr)
 
Parameters:  
FullAddr As String Full e-mail address or addresses to extract friendly name(s) for  
Delimiter As String (optional) A char or string to delimit returned email addresses with. If missing or empty, will use AddressDelimiter for that  
Return value As String Pure e-mail address part of the specified full e-mail address  

Usage example:

Dim Mailer, Msg
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.POP3")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.POP3")
'In ASP use Response.Write instead of MsgBox
Mailer.LicenseKey = "put your license key here"
Mailer.Connect "mailserver.com", 110, "MyName", "MyPassword"
If Mailer.Connected Then
   If Mailer.MessageCount > 0 Then
      Set Msg = Mailer.RetrieveSingleMessage(1)
      If Not Msg Is Nothing Then
        MsgBox "Reply-To e-mail: " & Msg.GetPureAddr(Msg.ReplyToAddr)
      End If ' If the message does not have Reply-To, empty string will be displayed
   End If
   Mailer.Disconnect
End If

See Also:

GetFriendlyName Method


Copyright © 2002-2022, AfterLogic Corporation. All rights reserved.