cancel
Showing results for 
Search instead for 
Did you mean: 

Using SMTP service in SAP Business Connector

Former Member
0 Kudos

Dear All,

Can any one tell me how to use SMTP service in SAP Business Connectors. My requirement is like I need to send a mail to a particular mail id, if a transaction fails.

Do i need to do some configuration from Administrator side.

What all efforts would be required for the same.

Regards

Siddhesh.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Does anyone know how to enter a carriage return in the body of an email sent from the business connector?

For example, my body is:

Variable 1 - %Variable1%  Variable 2 - %Variable2%

The body of my email ends up being:

Variable 1 - Toms Test 1  Variable 2 - Toms Test 2

I would like the body of the email to display:

Variable 1 - Toms Test 1

Variable 2 - Toms Test 2

Thanks for any input.

aashish_sinha
Active Contributor
0 Kudos

Hi,

You can find a components in wmPublic inside smtp.. And you can use that service to send mail when something fails in ur flow service. you just need to provide the correct structure..

Regards

Aashish Sinha

PS : reward points if helpful

Former Member
0 Kudos

@ Carlos,

I tried to test this service...

I had given my mail id xyz@gmail.com in to and from fields.

mailhost as gmail.com,

subject etc

but it failed saying could not connect to the server.

Regards,

Siddhesh S.Tawate.

iprieto
Contributor
0 Kudos

The server name of gmail is smtp.gmail.com .

Regards

Former Member
0 Kudos

I followed the way you had suggested....

now it says,

********************************************************

Could not run the service 'PurOrd'.

java.io.IOException: javax.mail.MessagingException: Could not connect to SMTP host: 192.138.228.1, port: 25;

nested exception is:

java.net.SocketException: Connection aborted by peer: connect

***********************************************************

Does it mean that i have ask basis or networking guy to unblock port 25??

Regards

Siddhesh

iprieto
Contributor
0 Kudos

Hi Siddesh,

Yes, it's normal if you have a proxy you can not connect. Try to connect via telnet from server to be sure.

Try to install in your system a SMTP server, there are a lot of free servers for download.

Regards

Ivá

Former Member
0 Kudos

Hi Carlos,

I had escalated the issue to the BASIS/INFRA team. But they say that there is no configuration that can be done on the mail server side ( exchange server ). They told me that some configuration needs to be done from the BC side.

This is what he had to say:

Port 5555 is the non-standard default port used by SAP BC for HTTP connections. For SMTP the default port number is 25.

As far as i understand this port 25 is used when in routing rule we define email transport. But my requirement is like it should first do an http and only in case when http fails it should do SMTP.

So it is not possible to have routing rule with mail transport.

Can you give some inputs from your side.

Regards,

Siddhesh S.Tawate

Former Member
0 Kudos

Sounds like your BC is behind a firewall (it should be anyway). Get your firewall people to check their logs for attempted/failed connections from BC.

In case you have not done this : Also you need to set up the BC Admin Settings > Logging : Email Notification. Here put in the exchange server name and email address of alerts and set default email charset utf-8.

Once that is done give the service another direct test (or do something bad in BC - and you'll get an alert if logging is high enough) and then check with your firewall people if email still not coming through.

Former Member
0 Kudos

Hi All,

When I am using the SMTP service ( pub.client:SMTP ) in my flow, this SMTP request ( consisting of To, From, Mailhost, Subject etc parameters ) goes through which port. I mean it goes through the primary port ( 5555 ) or port 25 which is the default SMTP port for BC.

Regards,

Siddhesh S.Tawate

iprieto
Contributor
0 Kudos

The port for SMTP depends of mail server. The standard is 25.

Check firewall.

Regards

Ivá

Former Member
0 Kudos

Hi Carlos,

I did not get it. The primary port of my BC is 5555. and I have not configured any other mail port.

So when I am doing an SMTP it should go through 5555. Am I correct?

I had asked Infrastructure team to establish connectivity between BC 5555 port and mail server so that I can trigger mail using SMTP. But they say this is not possible and some config has to be done from BC side.

Regards,

Siddhesh S.Tawate

iprieto
Contributor
0 Kudos

SAP Bc server uses the port 5555 for listening request from other systems, this port is only for connecting to SAP BC. On the other hand, you can connect to other servers like Mailserver, FTP, WebDav ...... using the open ports of this servers.

If you wish to connect to mailserver over 25 port, the mail server and communications over this server must to be open, if not, you'll never connect to mailsever.

Best regards

Ivá

Former Member
0 Kudos

Hi Carlos,

Thanks a lot. You had been very helpful.

Can you please have a look at the below thread.

Business Connector: Conditional Mapping using Expression

Regards,

Siddhesh S.Tawate

Former Member
0 Kudos

Hi,

I tried doing telnet <mail server> 25 from the machine on which BC is installed.

The return message said Connection refused by mail host port 25.

Does this amply prove that there is connectivity issue between BC and mail server and there is nothing to be done from BC side for using the pub.client:SMTP service except for giving the above parameters.

When I had spoken to the basis guys here they say that there is no firewall between BC and mail server as they both are on same network.

Also if anyone knows let me know how to change the default SMTP coomunication port 25 to port 26 for outbound communications.

Regards,

Siddhesh S.Tawate

Former Member
0 Kudos

Hi Siddesh,

Please try to follow the below and see if it works.

- First try to get the SMTP server ip or host name which is accessible and which can be used in your company network.

- use that SMTP server name in the service SMTP

- I hope you cannot make use of external SMTP server for this.

- If still not working, then try to set SMTP server in webconsole

Settings-->Extended

- or else include a line in Server.cnf file

watt.server.smtpServer=smtpserver

0 Kudos

I cannot believe your BC not behind a firewall even if exhange and BC on same network. I would still get your Network people to check this rather than your Basis people (what do they know anyway ! (joking))

Get your firewall people to check their logs for attempted/failed connections from BC. (Port 25 btw)

In case you have not done this : Also you need to set up the BC Admin Settings > Logging : Email Notification. Here put in the exchange server name and email address of alerts and set default email charset utf-8.

Once that is done give the service another direct test (or do something bad in BC - and you'll get an alert if logging is high enough) and then check with your firewall people if email still not coming through.

Former Member
0 Kudos

Hi All,

Thanks for your replys. What I am currently working on is the test server, the prod server is definitely behind a firewall. I will get back here as soon as I Move ahead in this issue. Thanks All.

Regards,

Siddhesh S.Tawate

Former Member
0 Kudos

Thanks everyone for their help specially Carlos.

Finally was able to get throught it. Actually it was the antivirus which was blocking the request. But had to push hard to get it done from basis people.

Regards,

Siddhesh S.Tawate

iprieto
Contributor
0 Kudos

Hi Siddhesh,

For configuring SMTP service you only have to use the smtp service.

The service is located in WmPublic/pub/client/smtp.

You must to fill the next parameters:

- To

- Subject

- Mailhost : Name or IP from mail server.

- Body: The body of message that you want to send.

- Mimestream if the content of the body is mime type.

You don't need to do any configuration in Server side.

Regards

Iván

Edited by: Carlos Ivan Prieto Rubio on Jan 10, 2008 5:32 PM