Einzelnen Beitrag anzeigen

Aramus

Registriert seit: 27. Apr 2008
3 Beiträge
 
#1

Problem beim Email über Indy senden.

  Alt 27. Apr 2008, 14:09
Ich habe mir ein Demoprogramm runtergeladen, aber das funktioniert nicht... Es kommt immer die Fehlermeldung:_

Zitat:
Im Projekt Sendmail.exe ist eine Exception der Klasse EIdProtocolReplyError aufgetreten. Meldung: 5.3.2 Sorry, during probation period you are not allowed to use SMTP service {mp013}
',Prozess wurde angehalten. Mit Einzelne Anweisung oder Start fortsetzen.
Hier der Quelltext:
Delphi-Quellcode:
unit f_Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TfrmMain = class(TForm)
    cmdSendMail: TButton;
    memBody: TMemo;
    procedure cmdSendMailClick(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  frmMain: TfrmMain;

implementation

uses JFSendMail;

{$R *.dfm}

procedure TfrmMain.cmdSendMailClick(Sender: TObject);
Var tmpMail : TJFSendMail;
begin
  tmpMail := TJFSendMail.Create;
  try
    // set to your smtp server, in this example gmx is used
    tmpMail.Host := 'mail.gmx.net';
    
    // is already set by default
    tmpMail.Port := 25;
    
    // set your username for the smtp server
    tmpMail.Username := '47237936';
    
    // set your password for the smtp server
    tmpMail.Password := 'XXXXXXXXXX';
    
    // set sender email adress
    tmpMail.Sender := 'nicknames@gmx.de';

    // set email of receiver
    tmpMail.Receiver := 'aramus92@gmx.de'; // please don't spam me, questions are allowed

    // set the mail subject
    tmpMail.Subject := 'TEST';

    // set the mail body
    tmpMail.Body.Assign(memBody.Lines);
    // also u can use
    // tmpmail.Body.add('First Line');
    // tmpmail.Body.add('Second Line');
    // ...

    // if u wanna attach some file to the mail use this :
    tmpMail.Attachments.Add('C:\autoexec.bat');
    
    // send to ltlogin or to ltNone, depends on your email provider
    tmpMail.LoginType := ltLogin;
    
    // don't need to be set, just for example
    tmpMail.MailAgent := 'MS Outlook *LOL*';

    // is pNormal by default, so don't need to be set
    tmpMail.Priority := pNormal;

    // is false by default, so don't need too be set
    tmpMail.ReturnReciept := false;
    
    // do the real send now
    if tmpMail.Send then
      ShowMessage('Mail successfull send!')
    else
      ShowMessage('Mail send failed');
  finally
    FreeAndNil(tmpMail);
  end;
end;

end.
Was hab ich da falsch gemacht???
  Mit Zitat antworten Zitat