cancel
Showing results for 
Search instead for 
Did you mean: 

BODS 3.1 :SMTP configuration to send email for success or failure of job

Former Member
0 Kudos

Hi.

This is further to this post : http://forums.sdn.sap.com/thread.jspa?threadID=1965129&tstart=0

Thanks to all for the help.

I did not find a complete set of information as things to do (for a person who is new to BODS).

Hence sharing the workflow which works for me when tested on a simple workflow :

Pre-requisite : SMTP service to be made available on the BODS server and port 25 to be opened up.

This is done by the IT dept of the company.

When smtp service is activated and port 25 is opened up, telnet IP address 25 should say, service is available.

Suggestion : create a email group like : bods at company.com which can be used to be used for the BODS JOBs. Which does not prompt for a password. This also is done by the IT dept of the company.

1) On the BODS server :

1) Click open Data Services Server Manager

2) SMTP settings for smtp_to functions :

Add the IP Address of the SMTP server

Add the email address of the sender. Eg. bodsjobs at companyname,com

3)Apply/Restart the server.

2) Login to BODS Designer :

Create a test job :

TRY ==>DF===> Script for success ===> CATCH script for failure

In the script for success : add the following :

print (' IN TRY BLOCK Before email ' );

smtp_to('bodsjobs at abc,com', ' SUCCESS OF JOB : '

|| job_name(),'Job completed successfully ', 0, 0);

print('After Email ');

In the script for Catch add the following :

print (' IN CATCH BLOCK Before email ' );

smtp_to('bodsjobs at abc,com', 'FAILURE OF JOB : '

|| job_name(),

error_number( ) || 'Error message: ' || error_message( ) ||

'check details', 50, 50);

print('After Email ');

Note : In the catch : select all exceptions on the check box.

Save all.

Click on the job and say execute.

The job will run and if it is successful. You will receive the succes mail.

If there is any error in the DF before the catch, you will receive a mail, which says failure.

The above workflow, when tested atleast works for me.

Hope this helps.

Regards

indu

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Indumathy,

Your comment is very informative. However, I ran into an issue with the e-mail alert job of mine. the job completes successfully with everything that it needs to do but NO E-MAIL IS RECEIVED. The log also says that the e-mail has been sent with all the necessary count and recipient details. Everything is normal as it used to be but no e-mail is received.

No change has been done to the configuration or the design. I am having this issue all of a sudden,

It'll be helpful if you could share something about this issue, if you've faced any of this kind

Thanks and regards,

Priyabrat

0 Kudos

Hi Indu,

Sorry I am replying to an older post.

I have a doubt on the same topic, why the 'To' list shows only one email id when the email is received ,even there is multiple recipients mentioned.

Is there any way we can know whether the email have been sent to the second recipient.

Thanks & Regards,

Neel Thomas

george_abraham3
Explorer
0 Kudos

Hi Neel,

Unfortunately, this is the behavior of BODS. We will not be able to know if the email has been sent to the other recipient. You can mention in the email body that the message has been sent to the other recipients.

Regards,

George

Former Member
0 Kudos

Thanks.

Former Member
0 Kudos

Hi Indu,

The above post you mentioned was very useful in setting up an SMTP connection. But i am facing the problem of SMTP 550 error whenever i run the job.

I am working from client accessing jobserver in windows 2008 server. My company mail is configured in outlook and i have given both pop and smtp details on the outlook as well as on the SMTP server in windows.

You mentioned on setting up a seperate account. Should i create that in BODS or outlook?

Did you face the same problem as i have been through?

Appreciate your earliest response.

Thanks,

Arun

Former Member
0 Kudos

Hi Arun.

Am really not aware as to how to make things work from the console.

I work on windows environment both at client and on the server.

It looks like you got a bit confused on suggestion of a email group account.

I never did anything on outlook configuration for activation of smtp for bods.

I think you should not mess with outlook.

I dont know from the client side how things work.

But i have worked directly on the BODS server where the bods installation was done.

It is relatively very simple to do and to test.

But to even test why you get that error.

All you need is just a email id. Which could be yours ???

Put your email id as the source of email in that box in the job server.

And put only your email id in smtp_to and test it.

Run a test job. If it completes successfully. You will receive a mail.

In the catch, if you have checked all the boxes for error capture,

if the job fails, it would throw a dump of the errors in the email.

Once everything works well and you receive emails for any jobs you are running.

Then you could decide for the source of your email id and for the receipients of your emails of the jobs.

You could put a group id of your team as source. And also in smtp_to script in case you want everyone to receive the alert that the job has been done or it has errors.

Or include only those email ids in the smtp_to whom you feel, should receive the mail.

Hope this idea helps.

Please dont mess with outlook for any smtp activation for bods.

It is not required if you are working on a windows environment.

You just need a email id for testing.

Outlook configuration does not come into picture at all.

if there is any other unix environment involved. I have no idea.

And i really do not know how things would be from a client side to configure.

Server configurations i do from the server.

I did all configurations on the main server machine. Not from the client.

And I have only one job server so i did everything there.

I did not do anything from management console.

I use management console only for monitoring of jobs on a daily basis, the dashboard which gives you details of the data pulled, time taken etc etc.

cheers

indu.

Edited by: Indumathy Narayanan on Oct 22, 2011 8:05 AM

Edited by: Indumathy Narayanan on Oct 22, 2011 8:09 AM

Edited by: Indumathy Narayanan on Oct 22, 2011 8:17 AM

Edited by: Indumathy Narayanan on Oct 22, 2011 8:18 AM

george_abraham3
Explorer
0 Kudos

Hi,

I have successfully sent the mail with the trace to multiple recipients. My current issue is that all the mail recipients can only see the first recipient's name provided in the SMTP_TO function. I require everyone to see to whom all the mails have gone to. Is this possible?

Regards,

George

Former Member
0 Kudos

Thanks Indu.

Did not see your post for a long time? I am seeing it now only.

Arun

Former Member
0 Kudos

Hi George Abraham

          I am trying to send mail from the BODS, on the status of the Job, i am using smtp_to() function, and i configured the smtp settings in server manager, but still unable to send the mail, i am getting error as "smtp error code 530" How to resolve this error.. Can you help me.

Thanks

Prasannakumar

george_abraham3
Explorer
0 Kudos

Hi Prasanna,

Check if your firewall or antivirus is blocking the email. That was one issue I had. Additionally, there are some rights to be given from the mail server to allow your server to send an email. These were the 2 issues I had eventhough I had configured the mail settings on the DS server.

Regards,

George

Former Member
0 Kudos

Hi George

I completely switched off my firewall, and the rights you are saying to assign is for the virtual SMTP mail server! am i right?

Thanks

PrasannaKumar