Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: can i direct send to one of mx records Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
shaokao
Newbie
Newbie
Avatar

Joined: 08 May 2008
Location: China
Online Status: Offline
Posts: 9
Posted: 19 May 2008 at 8:44pm | IP Logged Quote shaokao


like DirectSendServerConfig.RemoteEndPoint

Smtp.GetMXHosts(..)

I want to direct send to one of the list
Back to Top View shaokao's Profile Search for other posts by shaokao
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 20 May 2008 at 5:24am | IP Logged Quote Andrew

Once you got a list of MX servers via Smtp.GetMXHosts method, you should add any of them (e.g. the first) to Smtp.SmtpServers collection and send messages through that server.

For next (another) domain, just clear the SMTP servers collection and repeat the steps above.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
shaokao
Newbie
Newbie
Avatar

Joined: 08 May 2008
Location: China
Online Status: Offline
Posts: 9
Posted: 21 May 2008 at 11:02pm | IP Logged Quote shaokao

what's the role of SmtpServerCollection?

if i set ten smtp server,is it use one of them randomly?
Back to Top View shaokao's Profile Search for other posts by shaokao
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 22 May 2008 at 4:51am | IP Logged Quote Alex

If Smtp.SmtpServers contains one server, it will be used. If more than one, they will be used accordingly their priorities.

Please read SmtpServerCollection and SmtpServer.Priority documentation for details.

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

Joined: 08 May 2008
Location: China
Online Status: Offline
Posts: 9
Posted: 04 June 2008 at 9:57pm | IP Logged Quote shaokao

Once you got a list of MX servers via Smtp.GetMXHosts method, you should add any of them (e.g. the first) to Smtp.SmtpServers collection and send messages through that server.


i don't want to send message through that server.

i just want to directly send message to that server
Back to Top View shaokao's Profile Search for other posts by shaokao
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 04 June 2008 at 11:52pm | IP Logged Quote Andrew

In such case you should send messages via direct send as shown in the second example here or using Smtp.QuickSend method. These method don't use a relay server for sending.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 05 June 2008 at 3:57am | IP Logged Quote Andrew

Also, sending through a certain SMTP server allows you to send messages to that server. If you send a message to the domain handled by that server, it's sending to, not through.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
shaokao
Newbie
Newbie
Avatar

Joined: 08 May 2008
Location: China
Online Status: Offline
Posts: 9
Posted: 05 June 2008 at 4:42am | IP Logged Quote shaokao

quicksend method can't set the target ip manually

i want to set the target server in one of the Smtp.GetMXHosts() list by manually
Back to Top View shaokao's Profile Search for other posts by shaokao
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 05 June 2008 at 4:49am | IP Logged Quote Andrew

Quote:
Once you got a list of MX servers via Smtp.GetMXHosts method, you should add any of them (e.g. the first) to Smtp.SmtpServers collection and send messages through that server.


This allows you to do what you need in case if you send to the domain handled by the target MX server. If the MX server receives a message addressed to its domain, it doesn't relay it. This is exactly what you need.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 

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