[Gambas-user] gambas and email

Christopher Brian Jack brian at ...1334...
Wed Feb 22 22:55:54 CET 2006


On Wed, 22 Feb 2006, Rob Kudla wrote:

> It's meant to be used from other programs.  The following is
> pseudo-code to give you an idea of how I'd use it from Gambas.
> (Note: I don't think it's safe to assume that "mail" will be
> installed on any system or that it will know how to send
> Internet mail, so it may be safer just to open a socket to an
> SMTP server, assuming you can get the user's ISP's mail server
> address.)

Most systems have nslookup so if you need to send email to:

kilroy at ...1375...

It should suffice to use:

nslookup -type=mx kilroy.domain

to determine the user's email host then it's a matter of using SMTP to
talk to the server and send the mail.

Alternatively if your ISP provides its own SMTP superhost you can use your
ISP's SMTP server for outgoing mail and no nslookup is needed (except
maybe to look up your ISP's outgoing SMTP server) because the outgoing
server will do the necessary MX lookup.

.=================================================.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+================================================='
| brian _AT_ brians-anime _DOT_ com
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...




More information about the User mailing list