[twsocket] Sending Mail using MX records

2005-12-15 Thread David Rose
Am I correct in thinking that the SMTP client component does not support 
natively sending mail using MX records ?
In other words if I want to send mail using MX records I'd have to do a 
DNS lookup on the recipients email address then connect to that server 
using the SMTP client component, send the email, disconnect and then 
repeat for any other TO, CC or BCC addresses ?

If this is the case, I don't suppose anyone has any sample code where they 
might have already done something like this ? I searched the archives and 
found some code to get the MX record from a DNS server, but nothing more.

regards

David


David Rose

Navigator Systems Ltd,
Network Business Centre, 3 Gloucester Street,
Bath, BA1 2SE,UK

Main Tel: +44 (0)7000 NAVSYS (628797)
Fax: +44 (0)7000 NAVFAX (628329)

Company Email: [EMAIL PROTECTED] (Private e-mail on request)

CONFIDENTIALITY NOTICE

The contents of this e-mail are confidential to the ordinary user of
the e-mail address to which it was addressed and may also be
privileged.  If you are not the addressee of this e-mail you may not
copy, forward, disclose or otherwise use it or any part of it in any
form whatsoever.  If you have received this e-mail in error please
e-mail the sender by replying to this message.
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Sending Mail using MX records

2005-12-15 Thread Francois Piette
 Am I correct in thinking that the SMTP client component does not support
 natively sending mail using MX records ?
 In other words if I want to send mail using MX records I'd have to do a
 DNS lookup on the recipients email address then connect to that server
 using the SMTP client component, send the email, disconnect and then
 repeat for any other TO, CC or BCC addresses ?

Right. Use ICS TDnsQuery component. It is good programming practice to split 
different operations
into different component. SMTP component handle SMTP protocol, DNS component 
handle DNS requests
such as MX record. You are free to combine both components in your own 
component (or application) if
it happend that it is useful for you :-)

 If this is the case, I don't suppose anyone has any sample code where they
 might have already done something like this ? I searched the archives and
 found some code to get the MX record from a DNS server, but nothing more.

Look at the NsLookup demo included with ICS.

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Sending Mail using MX records

2005-12-15 Thread DZ-Jay
David Rose wrote:
 Am I correct in thinking that the SMTP client component does not support 
 natively sending mail using MX records ?

Yes.  As you point out, it is an SMTP client component, and as such 
connects to a specified SMTP server.  Performing direct connections to 
recipients' servers is the job of an SMTP server.

 In other words if I want to send mail using MX records I'd have to do a 
 DNS lookup on the recipients email address then connect to that server 
 using the SMTP client component, send the email, disconnect and then 
 repeat for any other TO, CC or BCC addresses ?

Yes.  But be aware that many ISPs do not allow direct connections from 
unknown SMTP clients/servers.  In particular, you must make sure that 
your IP address is not dynamic, and that your domain's DNS has a correct 
PTR record for enabling reverse-DNS lookups, otherwise they will assume 
you are a spammer and deny connections from you.

dZ.
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be