Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: Which HelloDomain should I be using? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Neil_Knight
Newbie
Newbie


Joined: 06 December 2011
Location: United Kingdom
Online Status: Offline
Posts: 30
Posted: 07 February 2012 at 3:03am | IP Logged Quote Neil_Knight

I have the following code and I'm unsure if I'm over-setting variables, or whether I am on the right track:
Code:

// Add an SMTP Server for each MX Server found
foreach (string smtpServer in mxDomains)
    mailer.SmtpServers.Add(new SmtpServer(smtpServer));

mailer.DirectSendDefaults.HelloDomain = mxServer;
mailer.DirectSendDefaults.LocalEndPoint = new IPEndPoint(serverIP, 0);


I then do a
Code:
mailer.Connect();
and
Code:
mailer.Hello();
after I've run through this configuration. What I'm unsure about is, am I actually using the
Code:
mailer.DirectSendDefaults.HelloDomain
in the Hello method, or should I be allocating this to the SmtpServer's HelloDomain?
Back to Top View Neil_Knight's Profile Search for other posts by Neil_Knight
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 07 February 2012 at 5:02am | IP Logged Quote Alex

When you're populating SmtpServers collection, direct send won't be used (unless all SMTP servers have been tried with no luck).

If you're emulating direct send manually (populating SmtpServers collection with MX servers), you'll need to set the corresponding properties (LocalEndPoint and HelloDomain) of SmtpServer object you're adding.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Neil_Knight
Newbie
Newbie


Joined: 06 December 2011
Location: United Kingdom
Online Status: Offline
Posts: 30
Posted: 07 February 2012 at 5:04am | IP Logged Quote Neil_Knight

Excellent. Thank you. That explains why my process is failing, since I'm sending out one IP and then it's resolving to a local IP and I'm getting disconnected.
Back to Top View Neil_Knight's Profile Search for other posts by Neil_Knight
 
Imux
Newbie
Newbie


Joined: 28 October 2012
Location: Bangladesh
Online Status: Offline
Posts: 1
Posted: 29 October 2012 at 7:25pm | IP Logged Quote Imux

Yes, the problem was in DirectSend...
Back to Top View Imux's Profile Search for other posts by Imux
 

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