?
Solved

smtp error when app closes

Posted on 2003-03-25
5
Medium Priority
?
135 Views
Last Modified: 2010-04-04
Im having trouble with the indy clients smtp. When i try to send the mail. It only sends it when i close the application. =/
0
Comment
Question by:decepti0n
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
DragonSlayer earned 140 total points
ID: 8208824
perhaps we can see you code?
0
 

Author Comment

by:decepti0n
ID: 8213010
procedure TFrmMain.Button1Click(Sender: TObject);
begin
smtp.Host := host.Text;
smtp.Port := 25;
message.Recipients.EMailAddresses := toadd.Text;
message.from.Name := from.Text;
message.Subject := subject.Text;
message.Body.Add(body.Text);
message.ReplyTo.EMailAddresses := reply.Text;
smtp.connect;
smtp.Send(message);
end;


I gave that event to a button, now i have to exit the app after i click the button before it will send the mail...
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 8223648
add a smtp.disconnect after the send?
0
 

Author Comment

by:decepti0n
ID: 8228017
if it was that easy then i wouldnt be asking people what to do. Can i get a code example man.
0
 

Author Comment

by:decepti0n
ID: 8228036
oh nevermind thanks man...
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question