>------- Original Message -------
> 2) How I will be able to connect in the SMTP server
if I only have the email
> account and I do not have the password? What do you
mean with "connect" ?

Under "normal" circumstances, you would connect to
your local SMTP Server (or your ISP's) to send
e-mail.  In your particular case, you want to connect
directly to the recipient's SMTP server.  The first
thing to do is to find out the server's address, and
you do this by performing a DNS Query and checking
the MX (Mail Exchanger) record:  You take the e-mail
address, split it on the '@' symbol, and take the
part on the right side -- that should be the
network's domain.  You perform the MX record query
against this domain, and it should return the host
address of the SMTP server that serves that domain. 
Note that this is not the same as trying to connect
directly to the domain name, as most of the time this
may not work.  (I'm sorry I can't help with that
part, because I've never used TDNSQuery.)

For example, suppose you have this list's address: 
<twsocket@elists.org>.  You take the domain part,
<elists.org>, and perform a DNS query for the MX
record, and the query returns the actual  address of
the mail server that serves elists.org:
<mail.elists.org>.  Once you have the SMTP server's
host address, you set that as the host property of
the TSMTPCli component, and then perform the SMTP
transaction as usual.

One thing to understand is that connecting to a
remote SMTP server depends on that server accepting
you as a valid external server.  This is important. 
It means that if the SMTP server requires some sort
of authentication, and you are not a local user (and
therefore do not have valid credentials), you won't
be able to connect.

That said, remote servers *should* allow external
connections when the recipient is local (how else
would the users ever receive mail from the outside
world?).  I say "should", because there may be some
restrictions.  For instance, the server may require
you to have a valid SPF record, or may perform some
look-up in anti-spam databases to make sure you are
not a known open-relay host, etc. Also, most, if not
all, major ISP networks block direct SMTP connections
from dynamic IP addresses (this includes Dial-Up as
well as Broadband connections).

I hope this helps.


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

Reply via email to