GetAcceptedRecipients Method


Returns the comma-separated string which lists the e-mail addresses of recipients which have been accepted by the server during sending.

This method makes sense only when AllowRefusedRecipients is True. Otherwise, if the message was sent successfully, this will means all the recipients have been accepted anyway.


[Visual Basic]

strData = ObjectName.GetAcceptedRecipients

 
Parameters: None 
Return valueAs String The string containing the e-mail addresses separated with ", ".  
Remarks: For readility, the e-mail addresses are separated with "," followed by " " (extra space after each comma).

Usage example:

Dim Mailer
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.SMTP")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.SMTP")
'In ASP use Response.Write instead of MsgBox
Mailer.LicenseKey = "put your license key here"
Mailer.ServerName = "mail.server.com"

' Comment next 3 lines if authentication is not required.
Mailer.AuthMethod = 2 ' Using LOGIN authentication
Mailer.UserName = "MyUserName" ' Mail account name
Mailer.Password = "MyPassword" ' Mail account password

If Mailer.Connect Then
  Mailer.Message.ToAddr = "bill@yoursite.com"
  Mailer.Message.FromAddr = "joe@mysite.com"
  Mailer.Message.Subject = "Just subject and empty body"
  Mailer.AllowRefusedRecipients = True
  Mailer.Send
  MsgBox "GetRefusedRecipients: " & Mailer.GetRefusedRecipients
  MsgBox "GetAcceptedRecipients: " & Mailer.GetAcceptedRecipients
  Mailer.Disconnect
End If

See Also:

GetRefusedRecipients method


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