Host is the address of your mail server.

UserId is the name of the login you use for the mail server.  Typically the
name of your network login account.

ToAddress is a list of e-mail addresses you are sending this e-mail to.

simple example :


nmsmtp.ClearParameters;
nmsmtp.PostMessage.body.clear;
nmsmtp.PostMessage.Attachments.Clear;

nmsmtp.UserId := 'wxv';
nmsmtp.Host := 'smtp.xtra.co.nz';
nmsmtp.PostMessage.Attachments.Add ('d:\temp\elle_macpherson.jpg');
nmsmtp.PostMessage.Body.Add ('Hello, World');

nmsmtp.PostMessage.FromAddress := '[EMAIL PROTECTED]';
nmsmtp.PostMessage.ToAddress.Add ('[EMAIL PROTECTED]);
nmsmtp.PostMessage.Subject := 'nmsmtp example';

nmsmtp.connect;
nmsmtp.sendmail;
nmsmtp.disconnect; 


Like some other people mention, the component is fairly crap, and there is
no source provided.  But it ships with delphi and is the de facto standard.
For a simple example like this, I doubt you would find any problems with it
(we havnt).  



 -----Original Message-----
From: Mark Howard [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 12:23 PM
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Simple Email


OK Thanks to those who replied.  Given that I am of Scottish ancestry (and
my needs are very modest) I am going to try initially with the FREE stuff
bundled with D5  ie TNMSMTP.

I tried the option 1 described below and all I got was zillions of IE
windows filling my screen - until I killed the process.

Now - I've found a fairly detailed example of the use of the TNMSMTP
component (above) in the Help system but have some questions.
Host property - would this be, say "smtp.xtra.co.nz"?  If not where should I
look to find it (I'm using Outlook Express)
UserID - what are they referring to here? Where do I look to find this?
PostMessage.ToAddress.Text - I've just put in my own email address.

The component should just need these 3 properties set to be able to
establish a connection, but it bombs with a message saying
"Null remote address".

Any ideas?

Mark
----- Original Message ----- 
From: Wilfred Verkley 
To: Multiple recipients of list delphi 
Sent: Wednesday, December 06, 2000 12:56 PM
Subject: RE: [DUG]: Simple Email


There are two kinds of mail components.  Client based ones that work using
mail client (using MAPI or something like Outlook OLE Automation), and
server based ones which use something like SMPT that talk directly to the
mail server.
 
Client based components usually have better integration with things like the
address book plus they leave a history of all mail sent in the outbox.
Server based ones are far simpler, dont require a mail client to be
installed, or a user to be logged in, and their much faster and efficient.
 
A common MAPI component for delphi ive seen is TEMail
(http://www.econos.de/software/borland/index.html).  Ive used this for a few
apps here at gen-i without any problems.
 
For the simple stuff you want to do, the FastNet TNMSMTP component is
probably more then adequete.  We use this here for a simple report generator
& mail-out program and it does the job just fine.  For more advanced stuff
like mail-merges for the marketing dept we use JMail which is pretty much
the best and most popular SMTP mail component out there
(http://www.dimac.net).  

-----Original Message-----
From: Mark Howard [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 4:56 AM
To: Multiple recipients of list delphi
Subject: [DUG]: Simple Email


Hi

I need to be able to generate from within my app a fixed format Email
containing a subject line, no message, but with an attached text file.

I'm using D5 Pro.

Is this fraught with difficulties for the inexperienced?

If not, can any one give me some simple pointers?

What components are involved?
What are the steps that have to be taken and in what order?
What bits of information (communications) do I need?

There doesn't seem to be any items in the Delphi documents that leap out and
say "This is what you're looking for!"
Maybe it's all hiding behind the Web jargon.

Can anyone point me to an example?

TVMIA

Mark


This e-mail message has been scanned and cleared by MailMarshal at
www.gen-i.co.nz 




This e-mail message has been scanned and cleared by MailMarshal
www.gen-i.co.nz 




This e-mail message has been scanned and cleared by MailMarshal at
www.gen-i.co.nz 

######################################################################
This e-mail message has been scanned and cleared by MailMarshal 
http://www.gen-i.co.nz
######################################################################
---------------------------------------------------------------------------
    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"

Reply via email to