on 08-29-2012 10:05 AM
Hi All,
Can Data Services ( any version of SAP BODS) provides a facility to send files (output file/log files) as email attachment through SMTP services ?
Hi, Rahul.
Actually you can use the native DS mailer.exe application to accomplish this task. I have been testing this few months ago using the MS Outlook mail client.
In order to do that you'll need Outlook and an antivirus installed in the Job Server machine. Outlook won't allow a third party application to send emails through its client if a valid antivirus is not found.
1. Configure the Server and the Sender in the DS Server Manager.
2. In Outlook (2007/2010), click File > Options > Trust Center (left panel) > Trust Center Settings... > Programmatic Access (left panel) and select "Never warn me about suspicious activity". This will allow DS to send emails through the Outlook client. If your antivirus is supported by Microsoft, you will see "Antivirus status: Valid" on this screen.
You should now be able to send emails with attachments using the following command within a script in your job:
exec('cmd','mailer -fsender@ yourcompany.com -trecipient@ othercompany.com -sEmailSubject -mC:\temp\emailbody.txt -aC:\temp\CompanyResults.zip',8);
Where:
-f defines the sender configured in the Server Manager.
-t defines the recipient (or recipients list separated by commas).
-s defines the subject of the email. A variable can be used to pass a list of recipients (separated by commas).
-m defines a file which contains the body of the email.
-a defines a file to be attached to the email.
I hope it helps you.
Regards,
Leo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the email adapter available from versions 11.5. Check this link.
http://wiki.sdn.sap.com/wiki/display/EIM/Example+II+-+the+eMail+Adapter
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can achieve this by a 3rd party utility like Bmail and mpack.
See also this KB 1588974 - smtp_mailer.exe does not send attachments - Data Services XI 3.X
https://bosap-support.wdf.sap.corp/sap/support/notes/1588974
Thanks
Nawfal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Basically instead of using the SMTP_TO function, you can use instead the exec command to call another SMTP mail sender to send attachments.
This is the content of the KB:
Symptom
A script using an exec command to call smtp_mailer.exe in Data Services designer fails to send attachments as part of the email notification.
The email notification is received ok but the file specified as attachment is missing.
Environment
Data Services XI 3.x
Any supported OS
smtp_mailer.exe found in %LINK_DIR%\bin
Reproducing the Issue
In Data Services designer create a sample job.
Add a script like this:
exec('C:\PROGRA~1\BUSINE~1\BUSINE~1\bin\smtp_mailer.exe'-r"<Mail server>" -f"<Mail from>" -t"<Recipients>" -s"<Subject of Mail>" -m"<File name>" -v,0);
Cause
smtp_mailer.exe does not support sending attachments.
Resolution
This can be achieved by using other 3rd party utilities instead of smtp_mailer.
Bmail and mpack are examples of Command Line SMTP Mailer for Batch Jobs that would send email attachments.
Refer to this site (http://retired.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm) for download and how to.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.