AllowRefusedRecipients Property


Set AllowRefusedRecipients=True to let MailBee ignore "recipient refused" errors from the mail server in case if at least one recipient of multi-recipient e-mail message gets passed through.

By default, refused recipients are not allowed and this property is False.


Value Type: Boolean
Parameters: None 

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.