Mark,
The stuff I sent works fine with MDaemon here. Just to clarify the IP
address is for the PC that runs teh MDaemon..... that being the mailserver
or smtphost. The only other thing I can think of is that the properties
have remenants from previous attempts.... maybe you need to clear on those
stringlist-look-alikes. I also note the absence of subject.... some things
are silly about it, try putting one in. Have you tried my proglet with the
appropriate parameters ? I know that technically, I was supposed to put in
ReplyTo but it appears to work here..maybe you need to initialise it.
I have been using to for some weeks now to zip up all new source files on my
drives and email home every day.
----- Original Message -----
From: "Mark Howard" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Wednesday, 13 December 2000 14:00
Subject: [DUG]: Not so easy Email!!
Hello
I made a small app with a SendMail button. Here is the code.
procedure TForm1.Button1Click(Sender: TObject);
begin
NMSMTP1.Host := 'smtp.xtra.co.nz';
NMSMTP1.UserID := 'mhoward';
NMSMTP1.PostMessage.ToAddress.Add('[EMAIL PROTECTED]');
NMSMTP1.PostMessage.FromAddress := '[EMAIL PROTECTED]';
NMSMTP1.PostMessage.FromName := 'Anna';
NMSMTP1.PostMessage.Body.Add(
'This is a test email message from within a Delphi test App');
NMSMTP1.Connect;
NMSMTP1.SendMail;
end;
On my own system (my workstation has the modem connection) if I manually
dial up an Xtra connection and then click the SendMail button, this works
fine.
However, the client's system is a Win98/Win95 network which is running
MDaemon to handle email. The network's modem happens to be on the machine
that my app is on.
I have changed my test app as follows.
procedure TForm1.Button1Click(Sender: TObject);
begin
NMSMTP1.Host := '192.168.0.5'; {IP address of the workstation with
modem and My app}
NMSMTP1.UserID := 'ian';
NMSMTP1.PostMessage.ToAddress.Add('[EMAIL PROTECTED]');
NMSMTP1.PostMessage.FromAddress := '[EMAIL PROTECTED]';
NMSMTP1.PostMessage.FromName := 'Anna';
NMSMTP1.PostMessage.Body.Add(
'This is a test email message from client from within a Delphi test
App');
NMSMTP1.Connect;
NMSMTP1.SendMail;
end;
I understood that this should work on the client system but it fails with
the error "Null remote address".
Can anyone see where I have gone wrong?
Another option would be to by-pass MDaemon (if that is allowed). But I
don't want them to have to dial up a connection manually (and Rohit's RAS
thingamy looks complicated!!)
TIA
Mark
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"