Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jun : SMTP authentication
| Subject: | SMTP authentication |
| Posted by: | "Ernest P. Worrell" (lkill..@charter.net) |
| Date: | Fri, 8 Jun 2007 16:46:34 |
I am using Indy 10 SMTP with Report Builder 10.06. In effort to resolve my
problem, I created a tiny app that send a graphic on on report. I have also
gone into the Indy source and "instrumentated" the code such that I can
capture all Send Cmd along with some states.
My client uses some old Mitel 5.2 mail server piece of crap running on a
Linux box but that is what I have to deal with.
My test app runs fine at any location but theres.
Here is what I see when I VCN in and run my little program. It appears that
their server cannot use EHLO but it is not authenticating on HELO either.
This has become such a crises that I have to fly out there Monday. I will
go to Corporate where their mail server is located and review their logs and
attempt to send mail from my laptop locally. If it works from there, I will
go to the poultry plant and test.
I want all my guns in my holster, ready and loaded, before I leave. Can
someone tell me the actual failure and what is causing it?
Thanks
captured by my little test app
========================================
Mail Component Created at: 6/8/2007 3:25:26 PM
Host mail.marshalldurbin.com 6/8/2007 3:25:29 PM
UserID gainco 6/8/2007 3:25:29 PM
Password gainco123 6/8/2007 3:25:29 PM
SMTP Service ready
Send Cmd EHLO ENTERPRISE
Send Cmd EHLO ENTERPRISE Resp Code:-1
Send Cmd HELO ENTERPRISE
Send Cmd HELO ENTERPRISE Resp Code:250
Connected :True
Authenticated :False
mail.marshalldurbin.com pleased to meet you, ENTERPRISE
Send Cmd QUIT
Send Cmd QUIT Resp Code:221
Disconnected from Mail Server 6/8/2007 3:25:30 PM
Send Cmd QUIT Resp Code:221
Disconnected from Mail Server 6/8/2007 3:25:30 PM
============================================
Source of my test app.
unit main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, DB, StdCtrls, ExtCtrls, StatChar, ppEmail,
ppCtrls, ppBands, ppVar, ppPrnabl, ppClass, ppCache,
ppComm, ppRelatv, ppProd, ppReport, ComCtrls, Buttons, ppSMTPIndy10,
DateUtils, jpeg, Spin, ppStrtch, ppRegion;
type
TfrmMain = class(TForm)
ppReport1: TppReport;
ppTitleBand1: TppTitleBand;
ppHeaderBand1: TppHeaderBand;
ppDetailBand1: TppDetailBand;
lblStatus: TLabel;
bBtnSend: TBitBtn;
BitBtn2: TBitBtn;
ppImage1: TppImage;
ppLabel1: TppLabel;
Memo1: TMemo;
cbOpenMailDialog: TCheckBox;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bBtnSendClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
procedure RunFreqReport;
{ Private declarations }
public
{ Public declarations }
ReportCol : TppEmail;
end;
var
frmMain: TfrmMain;
implementation
{$R *.dfm}
procedure TfrmMain.bBtnSendClick(Sender: TObject);
begin
ppReport1.EmailSettings.ShowEmailDialog := (cbOpenMailDialog.State =
cbChecked);
lblStatus.Caption := 'Processing Report';
RunFreqReport;
lblStatus.caption := 'Sending Report';
ReportCol.Send;
lblStatus.caption := 'Mail Sent';
end;
procedure TfrmMain.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ReportCol.Free;
end;
procedure TfrmMain.FormCreate(Sender: TObject);
begin
ReportCol:=TppEmail.Create;
Memo1.Lines.Add('Mail Component Created at: '+DateTimeToStr(Now));
end;
procedure TfrmMain.RunFreqReport;
begin
With ppReport1.EmailSettings do
Begin
FileName := 'TestSendOut.PDF';
HostAddress := 'mail.marshalldurbin.com';
UserName := 'gainco';
Password := 'gainco123';
FromAddress := 'gainco@marshalldurbin.com';
Recipients.Add('gainco@marshalldurbin.com');
Recipients.Add('jpullins@marshalldurbin.com');
Body.Add('');
Body.Add('John, If you get this notify me immediately. This is a
primitive test');
Body.Add('');
Body.Add('Mail Sent '+DateTimeToStr(Now));
Body.Add('');
Body.Add('');
Body.Add('');
Body.Add('To be added or removed from the Distribution List, please
call');
Body.Add('John Pullins');
Body.Add('');
Body.Add('');
Body.Add('');
Body.Add('');
Body.Add('');
Body.Add('');
Subject := 'Test Report for Jasper Marshall Durbin ';
end;
ReportCol.AddReport(ppReport1);
end;
END.