Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SMTP

Status
Not open for further replies.

Oppenhiemer

Programmer
Jun 28, 2001
315
GB
Hi -

I wonder if anyone can help me in using the SMTP component in Delphi ? I would like for users to be able to email from my program without having to involve their email client - so the SMTP component seemed to be the right choice.

Im guessing that the "host" refers to the address of the email server. So something like the information you input in say in the "outgoing SMTP server" information fields in Outlook.

Anyway, Im sure that this info is correct but the dam thing keeps comming back with "Error 503 - No Recipients".

I have noticed that there is room to input the user name in the SMTP component - but no password - whould not this be required as well?

Anyway, any working examples that I can modify or tips would be greatly appreciated.

Cheers..
Opp.



 
Oppenheimer,

I don't know about the SMTP component, but shows one way to do this. If you pass the function with a PreviewMsg parameter of FALSE, the message is sent directly without previewing.

It still uses the user's registered MAPI client, however, they don't necessarily need to do anything. This may or may not be a bad thing, depending on what you're planning on doing with this.

Hope this helps...

-- Lance
 
hi,

which version are you using. I donn't have an SMTP component. If you have Fastnet comes with delphi 6. you can use the NMSMTP component. In the demos of delphi there is a working example in demos\fastnet.
The way most of these components work is that a mail host is available something like smtp.web.com. Also the email address of the sender should be available in the component.

Steph
 
Thanks Lance, I managed to get that SendMail function working that you pointed me to - seemd to work fine.

Yes Steph, I am using the fastnet component that ships with Delphi 5 & 6. I dug out the example that ships with Delphi - but am unable to get it to work even though I specify the correct details for the mail server.

It keeps comming up with the "No Recipients" error. It may be that my ISP has changed their policy on allowing external clients to directly access their mail server (but I dont think so.)

Anyway - thanks for all your help guys (I guess I was just wanting to get to see how the component was used .)

Cheers..

Opp.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top