MailFromDSN Property


Optional DSN suffix for MAIL FROM command.

This is advanced property which lets you configure Delivery Status Notification settings for MAIL FROM command. If not empty, MailBee attaches this suffix to MAIL FROM command (which specifies the e-mail sender). Can be used in conjunction with RcptToDSN property.

Some servers do not support DSN. MailBee won't use append DSN suffix to any command in case if the server does not advertize support of DSN extension.

To learn the syntax of DSN suffixes, refer to RFC 1891 (ESMTP Delivery Status Notifications).


Value Type: String
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
  If Mailer.SupportsDSN Then MsgBox "This SMTP server supports DSN"
  Mailer.Message.ToAddr = "bill@yoursite.com"
  Mailer.Message.FromAddr = "joe@mysite.com"
  Mailer.Message.Subject = "Hello"
  Mailer.Message.BodyText = "Test"
  Mailer.Message.MailFromDSN = "RET=HDRS ENVID=QQ314159"
  If Not Mailer.Send Then MsgBox Mailer.ErrDesc
  Mailer.Disconnect
End If

See Also:

RcptToDSN Property
SupportsDSN Property


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