GetRefusedRecipients Method
Returns the comma-separated string which lists the e-mail addresses of recipients which have been rejected by the server during sending.
This method makes sense only when AllowRefusedRecipients is True and when the message has multiple recipients. When it's False, MailBee stops sending when it encounters any refused recipient. When the message has only one recipient, refusing it by the server also means the message cannot be sent.
[Visual Basic] strData = ObjectName.GetRefusedRecipients |
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:
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.