EmailSettings
Hi,
I'm using Delphi 7 and ReportBuilder 10.04
I'm probing ReportBuilder's email capabilities but when I try to send email
to my company's mail server, by using demo report dm0110, I get the
following error message:
EIdProtocolReplyError with message:
5.3.3 AUT mechanism Login not available
I'm using the HostAddress, UserName and Password as configured in my Outlook
Express (SMTP address, Account name and Password)
My outgoing mail server does not require authentication (checkbox is
unchecked).
In the form's OnShow event, I have the following code:
HostAddress := '196.33.84.244';
UserName := 'myid';
Password := 'whetever';
Subject := 'Test mail';
Recipients.Clear;
Recipients.Add('nols@geoscience.org.za');
FromName := 'nols@geoscience.org.za';
Any idea what's the problem?
Regards,
Nols Smit
I'm using Delphi 7 and ReportBuilder 10.04
I'm probing ReportBuilder's email capabilities but when I try to send email
to my company's mail server, by using demo report dm0110, I get the
following error message:
EIdProtocolReplyError with message:
5.3.3 AUT mechanism Login not available
I'm using the HostAddress, UserName and Password as configured in my Outlook
Express (SMTP address, Account name and Password)
My outgoing mail server does not require authentication (checkbox is
unchecked).
In the form's OnShow event, I have the following code:
HostAddress := '196.33.84.244';
UserName := 'myid';
Password := 'whetever';
Subject := 'Test mail';
Recipients.Clear;
Recipients.Add('nols@geoscience.org.za');
FromName := 'nols@geoscience.org.za';
Any idea what's the problem?
Regards,
Nols Smit
This discussion has been closed.
Comments
We have not seen this behavior before. This is a message sent by your mail
server to Indy either telling you that your login or password is incorrect
or perhaps that even trying to login before sending causes an error.
1. Be sure your login and password are correct including case.
2. By default, the SMTP object is set to login before sending from a mail
server. Try changing the source of the ppSMTPIndy.pas file in the
TppSMTPIndy.Create routine. Change the following line:
FSMTP.AuthenticationType := atLogin;
to
FSMTP.AuthenticationType := atNone;
(If this fixes the problem, let me know and I'll add a property for the next
version of ReportBuilder.)
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I tested it at home with the build-in mail server of dns4me from
www.rhinosoft.com without any problems. I then tested it at work as you
suggested. It then did not generate the mentioned error message but also no
email were generated. I then discussed it with our IT section and they told
me due to our firewall configurations it will never work. They did it in
order that worm viruses will not be able to generate email. Luckily I will
be able to use my own mail server from my systems at work.
About the property for authenticate or not - perhaps it will be needed. I
saw my mail server has the option to force authentication or not.
Another related question: As one can mail a report as a PDF attachment, can
one perhaps also use some ReportBuilder's functions to convert addition
attachments to PDF. Many mail servers in the corporative environment do not
allow attachments of MS origin.
Regards,
Nols Smit
After a little more research, I found that the authentication property was
added to support very old servers that give an error if an AUTH command is
sent. This leads me to believe that it would not help in your case as you
are most likely using an up to date email server.
I'm a bit unclear about what you would like to accomplish with regards to
the PDF attachments. ReportBuilder does not have a stand alone PDF
exporter, you need the entire product to export a report to PDF.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
It's on-the-fly conversion of attachments to PDF. After the user selected
an attachment and before mailing it, I want to convert it to the PDF format.
Regards,
Nols Smit
Forgive me, I'm still a bit unclear about what you would like to do. In
your application, if a user selects to send a report as an email, the email
feature will automatically export the report to PDF then send it in one
step. There is no need to export the report yourself. Did you have
something else in mind?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
component is alone-standing. It's not connected to a Pipeline component.
I only want to use it's email functions.
In the OnClick event of a button, I use the following code:
{================================================}
uses ppSMTPIndy;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
with ppReport1.EmailSettings do
begin
ShowEmailDialog := false;
PreviewInEmailClient := False;
ReportFormat := 'PDF';
HostAddress := 'smtp.infoveld.com';
UserName := 'nols';
Password := 'geelvis';
FromName := 'Nols Smit';
FromAddress := 'nols@infoveld.com';
Subject := 'Test mail via ReportBuilder';
Recipients.Add('nols@infoveld.com');
ReplyTo := 'nols_smit@yahoo.com';
Attachments.Clear;
Attachments.Add('d:\temp\SomeWordDocument.doc');
Body.Text := 'bla bla bla';
end;
ppReport1.SendMail;
end;
{================================================}
I've attached SomeWordDocument.doc. After I run the report, I receive the
mail with two attachments:
1) a Blank attachment named Report.pdf
2) The SomeWordDocument.doc attachment.
What I would like to receive:
The SomeWordDocument.doc converted to PDF format as a attachment and no
blank Report.pdf attachment
Regards,
Nols Smit
ReportBuilder does not have the ability to convert a Word document to PDF.
I believe there are other utilities available that will do this for you.
Although I'm a strong advicate for always using ReportBuilder, you really
don't need to use it to accomplish what you need. I would suggest simply
using the Indy TidSMTP and TidMessage objects included with Delphi to attach
and send the document. The TppSMTPIndy class is simply a wrapper around
these objects. Take a look at the TppSMTPIndy.AssignMessageToSMTP for how
the message is created in ReportBuilder.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com