Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: SMTP Response again and DnsServers? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
vladnech
Newbie
Newbie


Joined: 21 May 2010
Location: Australia
Online Status: Offline
Posts: 2
Posted: 21 May 2010 at 12:44am | IP Logged Quote vladnech

Hi guys

1. I have just digged into MailBee.SMTP, but I have probably the stupid question.
Is there any way to define whether the e-mail was sent to valid address.
I mean I have "To" e-mail: blabla@blabla.com

I am using MailBee version = 5.8.2.180.

Code:

Smtp smtp = new Smtp();
SmtpServer smtpServer = new SmtpServer(smtpSettings.SMTPServer);
smtp.SmtpServers.Add(smtpServer);

MailBee.Mime.MailMessage mailBeeMessage = new MailBee.Mime.MailMessage();

mailBeeMessage.To.Add(new MailBee.Mime.EmailAddress("blabla@blabla.com", "Bla Bla"));

mailBeeMessage.From = new MailBee.Mime.EmailAddress("noreply@local.com", "Noreply");
mailBeeMessage.Subject = "Subject 1";

mailBeeMessage.BodyHtmlText = "Test HTML";
mailBeeMessage.BodyPlainText = "Test";

smtp.Message = mailBeeMessage;

TestSendResult testResult = smtp.TestSend(SendFailureThreshold.AnyRecipientsFailed);

if (testResult == TestSendResult.OK)
{
   smtp.Send();   
}
else
{
   log.Error("Email with id {0} was NOT sent");
}

The developers are saying that it should work, but I don't get any message.

2. What is the method
smtp.DnsServers.Autodetect();
I mean does it work?

Thanks in advance
Back to Top View vladnech's Profile Search for other posts by vladnech
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 21 May 2010 at 5:34am | IP Logged Quote Igor

Quote:
but I don't get any message.


It's not clear what message you mean. Are you saying that you don't receive a bounce message, or that the message wasn't sent even though TestSend was positive?

You should note that positive TestSend result does not guarantee "real" message will be delivered successfully. Some servers may apply restrictions on sending rate per amount of time, so you might exceed the rate by TestSend.

Quote:
2. What is the method
smtp.DnsServers.Autodetect();
I mean does it work?


This method retrieves the information about DNS servers from Windows registry and some other locations, this information will be used for DNS MX lookup in direct send mode (without SMTP server specified explicitly).

Note that direct send is often used by spammers. Thus, many mail services do not accept mail submissions from unknown hosts. It's recommended to perform direct sending from the domain which has at least one MX record assigned.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
vladnech
Newbie
Newbie


Joined: 21 May 2010
Location: Australia
Online Status: Offline
Posts: 2
Posted: 23 May 2010 at 4:56pm | IP Logged Quote vladnech

Hi Igor

Thanks for your reply.

1. "Are you saying that you don't receive a bounce message, or that the message wasn't sent even though TestSend was positive?"
Yes. It is positive. I understand that it is not possible to get a result on sending of e-mail to fake address. In this case, the only option left is to scan for bounce e-mails?

2. The previous solution was based on using of DNS scan. We are using SMTP server inside of our network. I am working the service, which sends e-mails to our customers. It is a pretty easy task, but business wants to get the results on sending e-mails. I am trying to figure out whether it's possible.

Thanks
Back to Top View vladnech's Profile Search for other posts by vladnech
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 24 May 2010 at 6:44am | IP Logged Quote Igor

There is no universal way to check if the email address can accept mails; if such method existed, it would be immediately abused by spammers.

Indeed, analyzing bounce messages is the most reliable approach towards detecting whether email was delivered or not. We do have a few tutorials on this, as well as BounceMail component which offers DeliveryStatusParser class used for analyzing bounce messages.

If you like, you can configure DSN (Delivery Status Notifications) to send notifications always, even on successful sending; this documentation page shows the idea.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide