Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

smtp error when app closes

Posted on 2003-03-25
5
Medium Priority
?
136 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
  • 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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses
Course of the Month10 days, 3 hours left to enroll

571 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