Sending email directly from ReportBuilder
Hi,
I am trying to send email directly from Reportbuilder.
Currently I have this code here:
Report.EmailSettings.Enabled := True;
Report.EmailSettings.PreviewInEmailClient:= True;
Report.EmailSettings.HostAddress := 'smtp.example.com';
Report.EmailSettings.Recipients.Add('user@example.com');
Report.EmailSettings.FromAddress := 'user@example.com';
Report.EmailSettings.Subject := 'Test message subject';
Report.EmailSettings.Body.Add('Test message body');
This brings email button just next to print button.
When I press email button, it gives me dialog where all the fields are pre-filled just right.
But, pressing 'Send' -button closes the dialog but seems that nothing happens.
What possibilities do I have to debug this problem or is there some very clear solution to solve this?
I am trying to send email directly from Reportbuilder.
Currently I have this code here:
Report.EmailSettings.Enabled := True;
Report.EmailSettings.PreviewInEmailClient:= True;
Report.EmailSettings.HostAddress := 'smtp.example.com';
Report.EmailSettings.Recipients.Add('user@example.com');
Report.EmailSettings.FromAddress := 'user@example.com';
Report.EmailSettings.Subject := 'Test message subject';
Report.EmailSettings.Body.Add('Test message body');
This brings email button just next to print button.
When I press email button, it gives me dialog where all the fields are pre-filled just right.
But, pressing 'Send' -button closes the dialog but seems that nothing happens.
What possibilities do I have to debug this problem or is there some very clear solution to solve this?
Comments
Presumably you are adding the smtp server login and password details??
Ian
thanks for reply.
SMTP server does not need authentication. Should I add those as well?