AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi: E-Mail-Versand / E-Mail-Formatierung
Thema durchsuchen
Ansicht
Themen-Optionen

Delphi: E-Mail-Versand / E-Mail-Formatierung

Ein Thema von SvenLittkowski · begonnen am 30. Jan 2011 · letzter Beitrag vom 7. Feb 2011
Antwort Antwort
Seite 4 von 5   « Erste     234 5      
Mike_

Registriert seit: 26. Mär 2008
98 Beiträge
 
Delphi 2007 Professional
 
#31

AW: Delphi: E-Mail-Versand / E-Mail-Formatierung

  Alt 5. Feb 2011, 22:15
Ich hatte die DLLs im selben Verzeichnis wie die EXE meines Programmes, aber trotzdem der selbe Fehler. Sind dies die korrekten DLLs?
SvenLittkowski,

First step:
Question -> "Sind das die richtigen .dll´s"
Careful consideration -> Are more versions out there of the same kind of .dlls ?
Answer -> Yes

2nd step:
Question -> Why, who need different versions ?
Careful consideration -> What is the right version for my app. ? What do I use ?
Answer -> Indy v. X || Delphi X

3rd step:
Question -> Which version shoudl I take for Indy v. X || Delphi X ?
Careful consideration -> Google & Indypage

4th step:
Next time ask yourself that kind of questions and before asking, use the board search.

Otherwise I'm going to punish you by making you peel onions for 6 months in a submarine.
I swear I will.



Idea:
http://www.delphipraxis.net/157566-i...ml#post1075647
Delphi-Nachwuchs

Geändert von Mike_ ( 5. Feb 2011 um 22:21 Uhr)
  Mit Zitat antworten Zitat
SvenLittkowski

Registriert seit: 18. Dez 2004
98 Beiträge
 
#32

AW: Delphi: E-Mail-Versand / E-Mail-Formatierung

  Alt 6. Feb 2011, 00:18
Well, but the shocking fact is, that I really love onions! I eat them even fresh! True thing that. And also, I am very interested for submarines, especially the ones with the new "whisper engines" (these magnetically charging water tubes).

Well, I was of course looking before I was asking. I just today downloaded the latest version of the Indy components, v.10.0.52. And the DLLs I was downloading, are openssl v.1.0.0c for the i386 CPU and for Windows 32bit. That should work.

And the error is not an error of incompatibility, but of simply not finding them, as far as I can say. I wondered, if "libeay32.dll" and "ssleay32.dll" are the files I require. Seems so, based on what I researched. But still, why aren't they found? I have them just in the same folder like my new software I am developing, AND I pasted them inside my Windows' "System32" folder, too. Still, they are not found. That's why I wondered if these two files are the DLLs I needed, despite of my online research showing me, yes that they are.

I wished I could continue with the development, but this problem really holds me up.
  Mit Zitat antworten Zitat
Mike_

Registriert seit: 26. Mär 2008
98 Beiträge
 
Delphi 2007 Professional
 
#33

AW: Delphi: E-Mail-Versand / E-Mail-Formatierung

  Alt 6. Feb 2011, 01:48
http://indy.fulgan.com/SSL/

Laut google (http://www.delphigroups.info/2/12/211367.html) kommt die Version 0.96 für dich in Frage.


Leider hast du aber meinen Rat nicht befolgt.
Denn ich hatte dir im vorherigen Post noch einen Link geschrieben zum Schluss als "Idea", wo genau diese Version als attachment von mir gepostet wurde.


Aber weißt du was ?
Du bist ein richtiger Glückspilz.
(Siehe Upload)

lG
Angehängte Dateien
Dateityp: zip indy_openssl096g.zip (371,7 KB, 26x aufgerufen)
Delphi-Nachwuchs
  Mit Zitat antworten Zitat
SvenLittkowski

Registriert seit: 18. Dez 2004
98 Beiträge
 
#34

AW: Delphi: E-Mail-Versand / E-Mail-Formatierung

  Alt 6. Feb 2011, 02:37
Yes! You was right, and using the new DLLs does not cause the program to error for missing DLLs! But - my program is back to the previous state of halting after having clicked the SEND button. Means, the source code is still faulty. And I can't find the problem with "Run to Cursor" and "Step Over". Es ist zum Mäusemelken!

Hier der Quelltext:

Code:
implementation

uses Box1;

{$R *.dfm}

procedure TEpsilon.FormCreate(Sender: TObject);
begin
 Epsilon.Color:=Alpha.ColorDialog.Color;
end;

procedure TEpsilon.ButtonMailClick(Sender: TObject);
begin
 idSMTP.Host:='smtp.googlemail.com';
 idSMTP.Port:=465; //smtp service usually runs on this port 25
 idSMTP.Password:='MyPassword';
 idSMTP.UseTLS:=utUseExplicitTLS;
 //setup idmessage parameters
 idmessage.From.address:=EditEMail.Text;
 idmessage.Recipients.EMailAddresses:='MyEMail@gmail.com';
 idmessage.CCList.EMailAddresses:='';
 idmessage.BccList.EMailAddresses:='';
 idmessage.Subject:='My E-Mail';
 idmessage.Body.Text:=EditMailEra.Text+EditMailOld.Text+EditmailAmount.Text+EditMailModern.Text;
 idmessage.Body.Text:=idmessage.Body.Text+MemoMail.Lines.Text;
 //check if receipt confirmation is required
// if checkbox1.checked then idmessage.ReceiptRecipient.Text:=edfrom.Text; //if required, set the sendback email address to your email address
 //send the message
 try
  try
   idSMTP.Connect;
   LabelStatus.Caption:='Connecting...'; //…then show the message
   LabelStatus.Hint:='Connecting...'; //…then show the message
   idSMTP.send(idmessage);
   LabelStatus.Caption:='Sending...'; //…then show the message
   LabelStatus.Hint:='Sending...'; //…then show the message
  //if an exception occurs…
  except
   on E: EIdSMTPReplyError do
   begin
    LabelStatus.Caption:=E.Message; //…then show the message
    LabelStatus.Hint:=E.Message; //…then show the message
   end;
  end;
 finally
  //disconnect from server
  if IdSMTP.Connected then
  begin
   IdSMTP.Disconnect;
   LabelStatus.Caption:='Disconnecting...'; //…then show the message
   LabelStatus.Hint:='Disconnecting...'; //…then show the message
  end;
 end;
end;

procedure TEpsilon.ButtonBrowseClick(Sender: TObject); // doesn't function, so I disabled it - for now
begin
// if OpenDialog.Execute then TIdAttachmentFile.Create(idmessage.MessageParts,OpenDialog.FileName);
// AddAttachments;
end;
(*
procedure TEpsilon.AddAttachments; // caused problems, too
var
 li: TListItem;
 idx: Integer;
begin
 //clear the attachment listview
 lvAttachments.Items.Clear;
 //loop through Idmessage and count parts
 for idx:=0 to Pred(Idmessage.MessageParts.Count) do
 begin
  li:=lvAttachments.Items.Add;
  // Check if Idmessage contains any attachments…
  if Idmessage.MessageParts.Items[idx] is TIdAttachmentFile then
  begin
   //if so, get the file names…
   li.Caption:=TIdAttachmentFile(Idmessage.MessageParts.Items[idx]).Filename;
   //and add them to the listview
   li.SubItems.Add(TIdAttachmentFile(Idmessage.MessageParts.Items[idx]).ContentType);
  end
  else
  begin
   li.Caption:=Idmessage.MessageParts.Items[idx].ContentType;
  end;
 end;
end;
*)
procedure TEpsilon.IdSSLIOHandlerSocketOpenSSLStatusInfo(Msg: String);
begin
 LabelStatus.Caption:=Msg;
end;

procedure TEpsilon.IdSMTPStatus(ASender: TObject; const AStatus: TIdStatus;
  const AStatusText: String);
begin
 LabelStatus.Caption:=AStatusText;
end;

end.

Geändert von SvenLittkowski ( 6. Feb 2011 um 03:05 Uhr)
  Mit Zitat antworten Zitat
Mike_

Registriert seit: 26. Mär 2008
98 Beiträge
 
Delphi 2007 Professional
 
#35

AW: Delphi: E-Mail-Versand / E-Mail-Formatierung

  Alt 6. Feb 2011, 03:20
Ich teste es schnell bei mir, leider habe ich mein Testprogramm von vor 1 Monate gelöscht.

Ich werde dann diesen Post updaten und hänge dir die Datei an.
Delphi-Nachwuchs

Geändert von Mike_ ( 6. Feb 2011 um 04:01 Uhr)
  Mit Zitat antworten Zitat
SvenLittkowski

Registriert seit: 18. Dez 2004
98 Beiträge
 
#36

AW: Delphi: E-Mail-Versand / E-Mail-Formatierung

  Alt 6. Feb 2011, 03:49
Hey, vielen Dank!

Wie kommt's, daß Du oft beide Sprachen verwendest (Englisch und Deutsch)?
  Mit Zitat antworten Zitat
Mike_

Registriert seit: 26. Mär 2008
98 Beiträge
 
Delphi 2007 Professional
 
#37

AW: Delphi: E-Mail-Versand / E-Mail-Formatierung

  Alt 6. Feb 2011, 04:07
Im Anhang findest du die funktionierende Source.

Falls du es Anderen zur Verfügung stellen möchtest, bau dir noch ein Try...Except ein.

Hey, vielen Dank!

Wie kommt's, daß Du oft beide Sprachen verwendest (Englisch und Deutsch)?
Mir war einfach danach in deinem Thread.

Tip:
If you post sourcecode of an application, trim it.
Drop useless code.

Exempli gratia:
Delphi-Quellcode:
LabelStatus.Caption:='Connecting...'; //…then show the message
LabelStatus.Hint:='Connecting...'; //…then show the message
Label ZYX
Angehängte Dateien
Dateityp: zip GMail_SendIt.zip (690,2 KB, 30x aufgerufen)
Delphi-Nachwuchs

Geändert von Mike_ ( 6. Feb 2011 um 04:35 Uhr)
  Mit Zitat antworten Zitat
SvenLittkowski

Registriert seit: 18. Dez 2004
98 Beiträge
 
#38

AW: Delphi: E-Mail-Versand / E-Mail-Formatierung

  Alt 6. Feb 2011, 06:47
Beim Kompilieren das folgende:

Zitat von Mein Delphi 7:
[Hint] IdIOHandlerStack.pas(222): Overriding virtual method 'TIdIOHandlerStack.ConnectClient' has lower visibility (protected) than base class 'TIdIOHandlerSocket' (public)
[Error] IdIOHandlerStack.pas(222): Declaration of 'ConnectClient' differs from previous declaration
[Error] IdIOHandlerStack.pas(223): Method 'ReadFromSource' not found in base class
[Error] IdIOHandlerStack.pas(227): Method 'CheckForDataOnSource' not found in base class
[Error] IdIOHandlerStack.pas(228): Method 'CheckForDisconnect' not found in base class
[Error] IdIOHandlerStack.pas(235): Undeclared identifier: 'TIdBytes'
[Error] IdIOHandlerStack.pas(234): Method 'WriteDirect' not found in base class
[Error] IdIOHandlerStack.pas(238): Property 'ReadTimeout' does not exist in base class
[Error] IdIOHandlerStack.pas(313): Undeclared identifier: 'Toss'
[Error] IdIOHandlerStack.pas(319): Undeclared identifier: 'Toss'
[Error] IdIOHandlerStack.pas(329): Incompatible types
[Error] IdIOHandlerStack.pas(330): Undeclared identifier: 'FTransparentProxy'
[Error] IdIOHandlerStack.pas(330): Incompatible types
[Error] IdIOHandlerStack.pas(331): 'THEN' expected but identifier 'Enabled' found
[Error] IdIOHandlerStack.pas(332): Missing operator or semicolon
[Error] IdIOHandlerStack.pas(333): Missing operator or semicolon
[Error] IdIOHandlerStack.pas(347): Too many actual parameters
[Error] IdIOHandlerStack.pas(359): Undeclared identifier: 'ConnectTimeout'
[Warning] IdIOHandlerStack.pas(359): Comparing signed and unsigned types - widened both operands
[Error] IdIOHandlerStack.pas(368): Incompatible types
[Error] IdIOHandlerStack.pas(369): 'THEN' expected but identifier 'Enabled' found
[Error] IdIOHandlerStack.pas(370): Missing operator or semicolon
[Error] IdIOHandlerStack.pas(389): Undeclared identifier: 'IfFalse'
[Error] IdIOHandlerStack.pas(390): Incompatible types
[Error] IdIOHandlerStack.pas(397): Undeclared identifier: 'FClosedGracefully'
[Error] IdIOHandlerStack.pas(417): Cannot read a write-only property
[Error] IdIOHandlerStack.pas(420): Cannot read a write-only property
[Error] IdIOHandlerStack.pas(426): Undeclared identifier: 'BindingAllocated'
[Error] IdIOHandlerStack.pas(430): Undeclared identifier: 'FRecvBuffer'
[Error] IdIOHandlerStack.pas(430): Incompatible types
[Error] IdIOHandlerStack.pas(435): Incompatible types
[Error] IdIOHandlerStack.pas(436): Undeclared identifier: 'Receive'
[Error] IdIOHandlerStack.pas(437): Incompatible types
[Error] IdIOHandlerStack.pas(439): Undeclared identifier: 'Intercept'
[Error] IdIOHandlerStack.pas(439): Operator not applicable to this operand type
[Error] IdIOHandlerStack.pas(440): Missing operator or semicolon
[Error] IdIOHandlerStack.pas(441): Incompatible types
[Error] IdIOHandlerStack.pas(451): Undeclared identifier: 'InputBuffer'
[Error] IdIOHandlerStack.pas(451): Missing operator or semicolon
[Error] IdIOHandlerStack.pas(455): Undeclared identifier: 'Toss'
[Error] IdIOHandlerStack.pas(459): Undeclared identifier: 'IfTrue'
[Error] IdIOHandlerStack.pas(461): Undeclared identifier: 'FClosedGracefully'
[Error] IdIOHandlerStack.pas(467): Undeclared identifier: 'IfTrue'
[Error] IdIOHandlerStack.pas(471): Operator not applicable to this operand type
[Error] IdIOHandlerStack.pas(486): Undeclared identifier: 'ClosedGracefully'
[Error] IdIOHandlerStack.pas(487): Undeclared identifier: 'BindingAllocated'
[Error] IdIOHandlerStack.pas(499): Undeclared identifier: 'FInputBuffer'
[Error] IdIOHandlerStack.pas(499): Incompatible types
[Error] IdIOHandlerStack.pas(500): ')' expected but identifier 'Size' found
[Error] IdIOHandlerStack.pas(502): Undeclared identifier: 'RaiseConnClosedGracefully'
[Error] IdIOHandlerStack.pas(542): Undeclared identifier: 'SetDefaultClass'
[Fatal Error] Unit2.pas(7): Could not compile used unit 'IdIOHandlerStack.pas'
Liegt's vieleicht an unterschiedlichen Delphi-Versionen?

Aber das spielt letztendlich keine so große Rolle. Ich habe einfach Deinen Code kopiert und in mein Programm eingefügt, und meinen eigenen Code erstmal disabled. So, Programm gestartet und Mailknopf gedrückt und - Programm stehengeblieben...

Ich habe dann alles disabled, und dann von vorne und von hinten zeilenweise den Code enabled. Ich fand heraus, daß der Befehl "IdSMTP.Connect;" wohl das Erstarren des Programmes bewirkt. Was kann das verursachen? Mangeldne Kommunikation zum Google-Server? Zu langsame Kommunikation? Falsche Einstellungen des GMail-Kontos? Werde nochmal das Programm laufen lassen, dieses Mal aber mehrere Minuten warten, ob sich die Starre wieder löst.

UPDATE

Interessantes Ergebnis: GMail riet, "465" als Port zu verwenden, doch erst als ich Deine "587" verwendete, hing sich das Programm nicht mehr auf. Jedoch bekomme ich nun einen SSL-Fehler. Folgende Zeile wird markiert:

raise EIdOSSLConnectError.Create(RSSSLConnectError); ("Error connecting with SSL") Datei: IDSSLOpenSSL, bei mir Zeile 1849

Geändert von SvenLittkowski ( 6. Feb 2011 um 07:14 Uhr)
  Mit Zitat antworten Zitat
hathor
(Gast)

n/a Beiträge
 
#39

AW: Delphi: E-Mail-Versand / E-Mail-Formatierung

  Alt 6. Feb 2011, 06:54
Bei mir gibt es keine Probleme beim Compilieren.
(DELPHI 2007)

Allerdings muss man die überflüssigen Files löschen:
Project1.dproj
Project1.dproj.local
Project1.identcache

Geändert von hathor ( 6. Feb 2011 um 06:58 Uhr)
  Mit Zitat antworten Zitat
SvenLittkowski

Registriert seit: 18. Dez 2004
98 Beiträge
 
#40

AW: Delphi: E-Mail-Versand / E-Mail-Formatierung

  Alt 6. Feb 2011, 07:29
hathor, vielen ank.

Aber bei mir gibt es keine dieser doppelte Dateien im Verzeichnis meiner neuen Anwendung.

Ich schlafe erstmal über dieses Problem, ist Nacht hier...
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 4 von 5   « Erste     234 5      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:41 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz