Hello,

Please can someone help with an SMTP problem I'm having.

I am trying to use SMTP to send emails using PERL. I can't use sendmail
etc. as this needs to work on both Win32 and UNIX (unless anyone knows of a
free email client that can be called from Perl that works on Win32 and
UNIX). I am doing this for a charity which has an SMTP server I can access.
To prevent the SMTP server from being used to generate spam it only accepts
emails destined for the charity or those from valid email users on the
charity's servers.

The charity is setup into regions so there may be:

[EMAIL PROTECTED]
and
[EMAIL PROTECTED]
etc.

There are also aliases for example there may be
[EMAIL PROTECTED] which aliases to [EMAIL PROTECTED]
I'm not sure how the aliases are setup, but this is on a NT based mail
server.

I first tried using the standard SMTP calls from within perl however these
were ignored. I then realised that it appears to look at the headers within
the data (so by sending "To: user@xxxxxxx \n From: user@xxxxx" it would
send emails. This does not however work when sending to the alias addresses
on that server, it returns user not known.

Using the same server and netscape as the email client has no problems.

Looking at the emails sent using netscape there are considerably more
headers than when using perl eg:

with SMTP (MDaemon.PRO.v4.0.3.R)
        for (real address - not alias)

and

X-MDaemon-Deliver-To: (points to real address not alias)

Looking at these I guess there is either something I must to to find out
the real name of any alias on that server, or maybe I need to add some more
headers?  Can anyone give any suggestions about the extra things netscape
does when sending an email?

Any help greatly apreciated

Thanks
Stewart

PS. I've attached a copy of my basic source code (used for testing at the
moment).

(See attached file: smtptest.pl)

Note: The content of this email is my personal opinion and does not
represent the views of any organisations or companies I am associated with.

smtptest.pl

Reply via email to