Author |
|
Neil_Knight Newbie
Joined: 06 December 2011 Location: United Kingdom
Online Status: Offline Posts: 30
|
Posted: 07 February 2012 at 3:03am | IP Logged
|
|
|
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 and 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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 07 February 2012 at 5:02am | IP Logged
|
|
|
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 |
|
|
Neil_Knight Newbie
Joined: 06 December 2011 Location: United Kingdom
Online Status: Offline Posts: 30
|
Posted: 07 February 2012 at 5:04am | IP Logged
|
|
|
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 |
|
|
Imux Newbie
Joined: 28 October 2012 Location: Bangladesh
Online Status: Offline Posts: 1
|
Posted: 29 October 2012 at 7:25pm | IP Logged
|
|
|
Yes, the problem was in DirectSend...
|
Back to Top |
|
|