Solved

Using IdSMTPServer ?

Posted on 2006-10-30
35
6,055 Views
Last Modified: 2011-10-04
Hi,

My question is : how can i use IdSMTPServer to send e-mails from my PC? or is there is a way to send bulk e-mails without using My ISP, Hotmail, Yahoo, or google accounts? and if i must use one of those then how can i do it?

knowing i have Delphi 2006, INDY 10 components.

also please note that i don't want to buy any component, if there is a free components Plus Examples on how to use them in the way that I've just mentioned, then it's also a good idea, but i prefer if it's INDY 10 and IdSMTPServer.

thanks in advance,
0
Comment
Question by:Balshe
  • 16
  • 9
  • 5
  • +4
35 Comments
 
LVL 4

Accepted Solution

by:
AndersonCarli earned 125 total points
ID: 17837997
Look at Indy demos in:
  http://www.indyproject.org/Sockets/Demos/index.en.aspx

It will show how to send emails trough SMTP, without using any ISP.

But note that most email servers does'nt accept email from dialup (cable, DSL) connections,
so if you have static IP and you start to send spam, your IP will be black-listed.

Cheers,

Anderson
0
 
LVL 1

Author Comment

by:Balshe
ID: 17838165
i've already tryied those, but it didn't work
when i use "Indy 10 SMTPServer" demo i get this error"socket error # 10048 address already in use" and i didn't know how to fix it

do you have another example?


regards,
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 17840488
You said: is there is a way to send bulk e-mails without using My ISP, Hotmail, Yahoo, or google accounts

is there is a way to send bulk e-mails without using My ISP, Hotmail, Yahoo, or google accounts?

Anyone who is asking "is there is a way to send bulk e-mails without using My ISP, Hotmail, Yahoo, or google accounts" is trying to build a spambot, if you ask me. :-(
0
 
LVL 1

Expert Comment

by:real_icecoke
ID: 17841477
I have to agree to Alex' thought.

So maybe Balshe will give some more information about what he wants to.

The Answer to you #10048 is simple, but I won't help anyone building a spambot.
0
 
LVL 1

Author Comment

by:Balshe
ID: 17842978
guys you got me wrong :)

i want to create a monitoring tool for my PC at home and at work but i don't want anyone to know about it, and i don't want it to use any if my accounts or the company account because it's monitored. also it's some times needed to test our new outlook exchange projects in the company and I've been asked many times to build a program to send bulk e-mails to a specific account in the company or to multiple accounts to see how the anti spam procedure and program is working.
beside i've done it before in VB, but i don't know how to do it in Delphi.
so any suggestions?


Regards,
0
 
LVL 1

Author Comment

by:Balshe
ID: 17844195
I found this on INDY Docs.

//--
For TIdLPR and TIdRSH, we force the client to bind to a local port within a specific range before connecting to a server because these protocols require the client to use specific local port ranges when making a connection to a server.  This is done with the TIdTCPClient.BoundPortMin and TIdTCPClient.BoundPortMax properties.

 

Usually, if you do this with a specific IP address while a local port is in FD_WAIT state, the bind fails and Indy will then try to bind to the next port.  Unfortunately, when using the wildcard IP address (0.0.0.0), the bind will succeed while a port is in a FD_WAIT state but when you connect, you get an "Address already in use" error.  

 

The only workarounds available are:

 

• Wait a minute for the local port to get out of FD_WAIT state.

• Set the TIdTCPClient.BoundIP property to the to the machine's current local IP address.  This workaround can be problematic if a machine has more than one local IP address and you do not know which one to use.

 

For most clients, the best practice is to let the stack select any available local port because most servers do not care what local port the client is using and because of the issue we mentioned earlier.  Do not use the TIdTCPClient.BoundPort, TIdTCPClient.BoundPortMax, and TIdTCPClient.BoundPortMax properties unless you have a very compelling reason to do so.



//----

so now i put  TIdTCPClient.BoundIP =my local ip address
and i put the IDSMTP.BINDING to (0.0.0.0:158) PCMail-srv.

now i think it will work, i'll keep u updated guys

regards,

0
 
LVL 1

Author Comment

by:Balshe
ID: 17844343
ok Guys,

i reached a point where the SmtServer receives the message, but how can i make the smtp server sends the message to required e-mail address ???


regards,
0
 
LVL 17

Assisted Solution

by:TheRealLoki
TheRealLoki earned 125 total points
ID: 17845664
by far the easiest method is to simply have your SMTP server forward via your own ISP's mail server.
e.g. if your ISP is "meganet" smtp.maganet.com then you would forward all mail to smtp.maganet.com using the basic TidSMTPClient

You can of course, do the DNS lookup and SMTP relay yourself ( i think there might eb an example of SMTPRElay in the demos dir) but the above method is the easiest, and will
  use less international traffic (if you are concerned about such things)
  be more reliable (if your isp is down, you are unlikely to be on..)
  be faster (presuably you choose an ISP in your neighbourhood)
Totally up to you though :-)
0
 
LVL 1

Assisted Solution

by:real_icecoke
real_icecoke earned 125 total points
ID: 17845811
Yep - Loki is right - the easiest ways is something like this:

first - take the reveived Message (in SMTPServerReceiveMessageParsed event - hmm - I'm using indy9 - not sure if they changed this a little bit in v10) - in this event you have the ability to modify the content or headers of the mail
procedure TForm1.SMTPServerReceiveMessageParsed(ASender: TIdCommand;
  var AMsg: TIdMessage; RCPT: TIdEMailAddressList;
  var CustomError: string);

after you did what ever you want with your message(checking, adding CCs, BCCs,etc) push it out with an instance of TIdSMTP, like this:

      SMTP := TIdSMTP.Create(nil);
      SMTP.AuthenticationType := atNone;
      SMTP.Intercept := IdLogFile; //just for debugging if you like to
      SMTP.MaxLineAction := maException;
      SMTP.UseEhlo := true;
      SMTP.Host := edSMTPHost.Text; //your isp
      SMTP.Port := 25;
      SMTP.Connect();
      SMTP.Send(AMsg);
      if(SMTP.Connected) then SMTP.Disconnect;
      SMTP.Free;

This will send the received AMsg to the 'real' receiver

Sure you can use the relay, but except things like DNS lookup you have to think about other mechs that e.g. a sendmail server would - spooling, retries, bouncing etc. To get a delphi program behave like a common smtp relay is much work. Many rfcs you should read ;) It depends on what you expect from your application. Receiving, doing some work with the messages and sending it out after this, should be done by the above way very easy. And you don't have to think about all the common smtp server problems as mentioned.

gracias
icecoke


0
 
LVL 1

Author Comment

by:Balshe
ID: 17847080
Though i said i  said i don't want to send the email  using my ISP account Nor Gmail, but it's possible to use Gmail account, but the problem with Gmail is that i get an error message "Exception class EIdTLSClientSSLIOHandlerRequred with message 'SSL IOHandler is required for this setting"

Here is the code:




procedure TForm1.IdSMTPServer1MsgReceive(ASender: TIdSMTPServerContext;
  AMsg: TStream; var LAction: TIdDataReply);
var
 LMsg : TIdMessage;
 LStream : TFileStream;
 SMTP :TIdSMTP;
 MailHStack : TIdIOHandlerStack ;
begin

      LStream := TFileStream.Create(ExtractFilePath(Application.exename) + 'test.eml', fmCreate);
      MailHStack := TIdIOHandlerStack.Create(nil);
      SMTP := TIdSMTP.Create(nil);
      SMTP.AuthType := atSASL;
      SMTP.IOHandler := MailHStack;
      SMTP.UseTLS :=utUseImplicitTLS   ;
      SMTP.UseEhlo := True;
      SMTP.Host := 'smtp.gmail.com';
      SMTP.Port := 587;
      SMTP.Username:='MYGMAILACC@gmail.com';
      SMTP.Password:='MYPASS';
      LMsg:=TIdMessage.Create(nil);
      LMsg.LoadFromStream(LStream);
      SMTP.Connect();
      SMTP.Send(LMsg);
      if(SMTP.Connected) then SMTP.Disconnect;
      SMTP.Free;
Try
 LStream.CopyFrom(AMsg, 0);
Finally
 FreeAndNil(LStream);
End;

LMsg := TIdMessage.Create;
Try
 LMsg.LoadFromFile(ExtractFilePath(Application.exename) + 'test.eml', False);
 ToLabel.Caption := LMsg.Recipients.EMailAddresses;
 FromLabel.Caption := LMsg.From.Text;
 SubjectLabel.Caption := LMsg.Subject;
 Memo1.Lines := LMsg.Body;
Finally
 FreeAndNil(LMsg);
End;

end;



all this is because Gmail Needs to receive STARTTLS command first
since i got this error:"Must issue a STARTTLS command first"
and if you go to this link:
http://www.indyproject.org/KB/index.html?smtpmuststarttls.htm
you will find the solution:
"Indy 10 supports SMTP with explicit TLS.  In the Indy 10's TIdSMTP, you simply have to assign a TIdSSLIOHandlerSocketBase descendent to the TIdSMTP.IOHandler property and set the UseTLS property to either utUseRequireTLS if you do not want to use an unencrypted connection or utUseExplicitTLS if you are willing to use an unencrypted connection."

but i didn't know how to do it
can you help me here?
0
 
LVL 1

Expert Comment

by:real_icecoke
ID: 17848235
Balshe,

because I still use Indy9, my knowledge regarding the Indy10 SSL components is limited. I use the 'Clever Internet Suite' for doing ssmtp, which is quite nice and stable (no, I'm not connected to this company ;)).

But as far as I understand you just need to do this:

SMTP.IOHandler := <your TIdSSLIOHandlerSocketBase descendent>;
SMTP.UseTLS :=utUseExplicitTLS; //or utUseRequireTLS

But maybe one of the other peoples here has an exact information on this.

gracias
icecoke
0
 
LVL 1

Author Comment

by:Balshe
ID: 17853310

thanks "real_icecoke" for your answer,

but i need to know how to use "IOHandler " along with "TIdSSLIOHandlerSocketBase descendent"

"Workshop_Alex" what do you think ? :)

Regards,
0
 
LVL 1

Expert Comment

by:real_icecoke
ID: 17856766
hmm - thought this could be done by a simple:

mySIOH := TIdSSLIOHandlerSocketBase.Create;
SMTP.IOHandler := mySIOH;

but as I said - I have no indy 10.

So, listening.......



icecoke
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 17857126
> "Workshop_Alex" what do you think ? :)

I still think your intentions are a bit suspicious. You want to create a bulk emailer which bypasses your ISP at home and at work, making sure no one can link it back to you. If it's just for a simple monitoring tool then I just wonder why you're not using other techniques for this purpose. If all you want to do is monitor some system then it seems to me that a technique like SOAP would be far less suspicious.

The problem with GMail is the SSL for which the Indy components require some additional DLL. This DLL isn't freely available all over this world, even if it's a free tool. The techniques it contains cannot be exported to certain countries due to the laws on encryption in the USA. But I think that a Google search might turn up some sample code for Delphi/Indy that will allow you to send emails through the Google servers. At home I even have some code that allows me to send emails through SMTP over Google but right now (and for the next 8 hours) I'm not at home. Is that what you're looking for?
0
 
LVL 1

Author Comment

by:Balshe
ID: 17857950
Guys thanks for your support,

Dear Workshop_Alex,
if i'm going to use Gmail, do u think it's suspicious ?. anyway it's not for bad purpose i assure you. and it would be great if you send me some code that explains how to send through Gmail SMTP servers.
Also i would like for my program to be stand-alone not using additinal DLLS, is it possible ?

thanks again guys
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 17858592
Nope. Using GMail wouldn't be suspicious in my opinion. GMail is taking actions against spammers and people who abuse their email system. Btw, I am willing to believe you but can't take the risk that you're dishonest in your intentions. We don't need any more spammers. :-)

You still have to wait about 4 more hours before I'm back home, where I have some sample code available for sending emails with GMail. (And also on how to receive them from a GMail POP3 setup.) Unfortunately, I am not aware of any solution without the use of this special SSL DLL.
0
 
LVL 1

Author Comment

by:Balshe
ID: 17863241


i reached a point where i need a dll file "ssleay32.dll"
and i found it but it seems to be the wrong version, and i don't know if i need this dll "libeay32.dll" or not

and now i'm getting error "can not load SSL Library"


and here is the code




procedure TForm1.IdSMTPServer1MsgReceive(ASender: TIdSMTPServerContext;
  AMsg: TStream; var LAction: TIdDataReply);
var
 LMsg : TIdMessage;
 LStream : TFileStream;
 SMTP :TIdSMTP;
 SSL_LIST:TIdSASLEntries ;
 SSLHandler: TIdSSLIOHandlerSocketOpenSSL;
begin

      LStream := TFileStream.Create(ExtractFilePath(Application.exename) + 'test.eml', fmCreate);

      SSL_LIST:=TIdSASLEntries.Create(nil);
      SSLHandler:=TIdSSLIOHandlerSocketOpenSSL.Create;
      SSLHandler.Destination := 'SMTP.gmail.com:465';
      SSLHandler.Host := 'SMTP.gmail.com';
      SSLHandler.Port := 465;
      SSLHandler.DefaultPort := 0;
      SSLHandler.SSLOptions.Method := sslvTLSv1;
      SSLHandler.SSLOptions.Mode := sslmUnassigned;
      SSLHandler.SSLOptions.VerifyMode := [];
      SSLHandler.SSLOptions.VerifyDepth := 0;
      SMTP := TIdSMTP.Create(nil);
      SMTP.IOHandler := SSLHandler ;
      SMTP.UseTLS :=utUseImplicitTLS   ;
      SMTP.UseEhlo := True;
      SMTP.Host := 'smtp.gmail.com';
      SMTP.Port := 465;
      SMTP.Username:='MyGmailAcc@gmail.com';
      SMTP.Password:='MyPass';
      LMsg:=TIdMessage.Create(nil);
      LMsg.LoadFromStream(LStream);
      SMTP.Authenticate;
      SMTP.Connect();
      SMTP.Send(LMsg);
      if(SMTP.Connected) then SMTP.Disconnect;
      SMTP.Free;


Try
 LStream.CopyFrom(AMsg, 0);
Finally
 FreeAndNil(LStream);
End;

LMsg := TIdMessage.Create;
Try
 LMsg.LoadFromFile(ExtractFilePath(Application.exename) + 'test.eml', False);
 ToLabel.Caption := LMsg.Recipients.EMailAddresses;
 FromLabel.Caption := LMsg.From.Text;
 SubjectLabel.Caption := LMsg.Subject;
 Memo1.Lines := LMsg.Body;
Finally
 FreeAndNil(LMsg);
End;

end;

0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 17

Assisted Solution

by:Wim ten Brink
Wim ten Brink earned 125 total points
ID: 17864853
Unfortunately, haven't had the chance to get the code, but you are correct about those library files. But I have a code example for you:

idSMTP := TIdSMTP.Create( Self );
try
  idSMTP.OnStatus := idSMTPStatus;
  idSMTP.OnDisconnected := idSMTPDisconnected;
  idSMTP.OnWork := idSMTPWork;
  idSMTP.OnWorkBegin := idSMTPWorkBegin;
  idSMTP.OnWorkEnd := idSMTPWorkEnd;
  idSMTP.MailAgent := 'Your application';
  idSMTP.OnFailedRecipient := idSMTPFailedRecipient;
  idSMTP.OnTLSNotAvailable := idSMTPTLSNotAvailable;
  IdSMTP.Host := Configuration.SMTP.Text;
  IdSMTP.Port := StrToInt( Configuration.SMTP.Port );
  IdSMTP.Username := Configuration.Sender.Account.Text;
  IdSMTP.Password := Configuration.Sender.Account.Password;
  IdSMTP.AuthType := atDefault;
  IdSSLIOHandlerSocketOpenSSL := TIdSSLIOHandlerSocketOpenSSL.Create( Self );
  IdSSLIOHandlerSocketOpenSSL.DefaultPort := 0;
  IdSSLIOHandlerSocketOpenSSL.MaxLineAction := maException;
  IdSSLIOHandlerSocketOpenSSL.OnGetPassword := IdSSLIOHandlerSocketOpenSSLGetPassword;
  IdSSLIOHandlerSocketOpenSSL.OnStatus := IdSSLIOHandlerSocketOpenSSLStatus;
  IdSSLIOHandlerSocketOpenSSL.OnStatusInfo := IdSSLIOHandlerSocketOpenSSLStatusInfo;
  IdSSLIOHandlerSocketOpenSSL.SSLOptions.Mode := sslmClient;
  IdSSLIOHandlerSocketOpenSSL.SSLOptions.VerifyDepth := 2;
  IdSSLIOHandlerSocketOpenSSL.SSLOptions.VerifyMode := [ ];
  IdSSLIOHandlerSocketOpenSSL.Host := IdSMTP.Host;
  IdSSLIOHandlerSocketOpenSSL.Port := IdSMTP.Port;
  IdSSLIOHandlerSocketOpenSSL.SSLOptions.Method := sslvSSLv3;
  IdSSLIOHandlerSocketOpenSSL.PassThrough := True;
  IdSMTP.IOHandler := IdSSLIOHandlerSocketOpenSSL;
  IdSMTP.UseTLS := utUseImplicitTLS;
  IdSMTP.Connect;
  try
    IdSMTP.Send( Message );
  finally IdSMTP.Disconnect;
  end;
finally IdSMTP.Free;
end;

The Configuration object used in above example is where I store the settings of my account so replace it with the values you need. I also set MailAgent to some value so I can recognise messages from my own mailreader when I'm receiving them again through my POP3 reader. :-)
All the other settings have been copied by me from an old example that I used to have, but I replaced the sample with above code in my archive.
You might want to put the Connect() and Send() commands in a repeating loop, trying to connect/send up to three times since I discovered that GMail doesn't always execute the commands correctly. (It's a busy server.) By trying to reconnect and send a few times, you get around possible issues. For this repeating, I use the following code:

// To connect. (Repeats is an integer type.
Repeats := 3;
while ( Repeats > 0 ) do begin
  try
    IdSMTP.Connect;
    Repeats := 0;
  except
    if ( Repeats > 0 ) then begin
      Dec( Repeats );
    end
    else begin
      raise;
    end;
  end;
end;

// And copy/paste the same code, but now for sending:
Repeats := 3;
while ( Repeats > 0 ) do begin
  try
    IdSMTP.Send( Message );
    Repeats := 0;
  except
    if ( Repeats > 0 ) then begin
      Dec( Repeats );
    end
    else begin
      raise;
    end;
  end;
end;

But because of the size of these loops, I made the sample code a bit easier to read.

Btw, Message is of type TIdMessage and it is assumed that you've created it and loaded a message in it. (Only minor issue: I'm not sure which Indy version was used for this code. I think it's Indy 10 but it should not matter much.)
0
 
LVL 1

Author Comment

by:Balshe
ID: 17866807
Dear Workshop_Alex,


What is : idSMTPStatus, idSMTPDisconnected, idSMTPWork, idSMTPWorkBegin, idSMTPWorkEnd, idSMTPFailedRecipient, and idSMTPTLSNotAvailable  ?

Regards,
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 17866862
Oh, I forgot about those. Those are events. :-) No need to use them but I used them to generate all kinds of status information.

    procedure idSMTPDisconnected( Sender: TObject );
    procedure idSMTPFailedRecipient( Sender: TObject; const AAddress, ACode, AText: string; var VContinue: Boolean );
    procedure idSMTPStatus( ASender: TObject; const AStatus: TIdStatus; const AStatusText: string );
    procedure idSMTPTLSNotAvailable( Asender: TObject; var VContinue: Boolean );
    procedure idSMTPWork( ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Integer );
    procedure idSMTPWorkBegin( ASender: TObject; AWorkMode: TWorkMode; AWorkCountMax: Integer );
    procedure idSMTPWorkEnd( ASender: TObject; AWorkMode: TWorkMode );
    procedure IdSSLIOHandlerSocketOpenSSLGetPassword( var Password: string );
    procedure IdSSLIOHandlerSocketOpenSSLStatus( ASender: TObject; const AStatus: TIdStatus; const AStatusText: string );
    procedure IdSSLIOHandlerSocketOpenSSLStatusInfo( Msg: string );

All these events do is add some line to my log file, keeping a close eye on the whole status.

You don't need them! But they are useful in displaying the progress...
0
 
LVL 1

Author Comment

by:Balshe
ID: 17867577
Still Getting this error "Could not load SSL Library"
0
 
LVL 1

Author Comment

by:Balshe
ID: 17867776
i got the correct DLLs at http://indy.fulgan.com/SSL/indy_OpenSSL096m.zip
but now i get this : "Connection Closed Gracefully" from the client Side, while from the server side it seems as if it's sent, while there is no message received to the address required.



What do you think?


why is it much easier in VB ?? O.M.G





0
 
LVL 1

Author Comment

by:Balshe
ID: 17868110
now it worked,(Thanks to Workshop_Alex, and real_icecoke and all of you guys) , but i have to install those dlls on the PC's that i want this tool to work on ??

isn't there a better way, another way without using those Dlls?








0
 
LVL 1

Expert Comment

by:real_icecoke
ID: 17880300
Balshe,

I use 'Clever Internet Suite' and 'ip*works' instead of indy10 for ssmtp/pops - no use for additional DLLs and easy to implement. But both are commercial.

icecoke
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 17880570
@Blashe,
The separate DLLs are required because they contain the encryption technology which is required for the secure connection that GMail wants. And basically all you have to do is put these DLLs in the same folder as your executable. No need to register them or set them up in some way.
Unfortunately, those same DLLs have an export restriction mandated by the US laws. Makes it a bit difficult to export your application to North Korea... :-) But it also means that the sourcecode for these DLLs is also a bit difficult to get.

real_icecoke might have a good alternative, though. Unfortunately, I am unfamiliar with both component sets. 'Clever Internet Suite' looks very interesting though, but quite expensive. It amazes me that they don't seem to mention the export restriction on SSL encryption, though.

(The SSL DLLs can be downloaded from http://adg.bmpcoe.org/IndySSL/ in case you need them. But apparantly you already have them.)

Read: http://www.indyproject.org/KB/index.html?wherecanidownloadindysss.htm for a little bit more about the export restriction. Also read http://en.wikipedia.org/wiki/Ssl for more information. And finally, there might be an alternative solution for Delphi that uses Indy but not these separate DLLs but I don't know them. (Not yet, that is.)
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 17880587
http://www.openssl.org/ is also a nice read. :-)
0
 
LVL 1

Author Comment

by:Balshe
ID: 17881383
thank you all for answering , but what about SMPT RELAY ?
when i read the documentation about SMTP Relay i found that it's possible to send e-mail from ur machine and that the smtp relay component will look for DNS/IP, but i couldn't implement it. also couldn't make the demo provided with IND 10 to work without writing a valid DNS, and didn't know what should i write in the DNS field. it said on the INDY web site that if you don't write a DNS the component shall make a DNS Lookup ...!! but it's not working also.

thanks all for your replies, but i think we are all trying to learn something new here, and we all are looking for a way to send e-mail from stand-alone machine. i really like the challenge, and i like to read about Programming related stuff, but I'm facing great walls regarding this subject.



regards,

0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 17899003
http://en.wikipedia.org/wiki/SMTP_relay for SMTP Relays. :-)

Anyway, open relays are likely to be blacklisted and this stopped by your spamfilter or even your ISP. Most SMTP servers will therefore close their doors except for those connections they trust. If you find one, chances are that it will be blacklisted and possibly your ISP will block any email from that server to your system.
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 17905285
http://www.marcocantu.com/tips/oct06_gmail.html

Apparantly he doesn't seem to need those DLLs or maybe he forgot to mention them. :-)
0
 
LVL 1

Author Comment

by:Balshe
ID: 17977864
sorry guys, but i need more time to check the answers and try a few things.

thanks for your help.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21133089
Forced accept.

Computer101
EE Admin
0
 
LVL 1

Author Comment

by:Balshe
ID: 21134003
None of the apove seems to be the asnwer i need !!
0
 

Expert Comment

by:Delphiwizard
ID: 36909091
WorkshopAlex:
Are you willing to share your code for these events and how you act on them during the process of sending?

    procedure idSMTPDisconnected( Sender: TObject );
    procedure idSMTPFailedRecipient( Sender: TObject; const AAddress, ACode, AText: string; var VContinue: Boolean );
    procedure idSMTPStatus( ASender: TObject; const AStatus: TIdStatus; const AStatusText: string );
    procedure idSMTPTLSNotAvailable( Asender: TObject; var VContinue: Boolean );
    procedure idSMTPWork( ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Integer );
    procedure idSMTPWorkBegin( ASender: TObject; AWorkMode: TWorkMode; AWorkCountMax: Integer );
    procedure idSMTPWorkEnd( ASender: TObject; AWorkMode: TWorkMode );
    procedure IdSSLIOHandlerSocketOpenSSLGetPassword( var Password: string );
    procedure IdSSLIOHandlerSocketOpenSSLStatus( ASender: TObject; const AStatus: TIdStatus; const AStatusText: string );
    procedure IdSSLIOHandlerSocketOpenSSLStatusInfo( Msg: string );
0
 
LVL 1

Author Comment

by:Balshe
ID: 36912215
wow this is a 5 years old question, i forgot all about this, i remember i didn't complete this one, sorry :)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now