Considering you have set up the SAP SMTP service as described in this document: Configuring SAP SMTP service. An important step is to know if the service is working. Testing the outbound process is easy and straight forward: it’s just sending an email and check if the receiver receives it. That’s too easy to be discussed here. On the other side, sending emails to the SAP SMTP server (or: receiving) is not so easy and can be even more crucial. The first question here of course is: how to send an email to SAP SMTP?

You can simulate receiving emails using a transaction. SOIN allows to simulate receiving an email, but does this really simulates / tests the flow of the message: receiving an email from another computer on port 25[nnn]? What about having an external system actually having send an email? How can you simulate this? You can of course set up a complete mail infrastructure and let a real SMTP server forward emails to SAP, but that’s not really easy and you’ll end up having to configure somewhat more than just your SAP system. Setting up the whole mail route can take time and is not always possible. This means also using for instance Outlook won’t be possible.

You can use telnet to talk to an SMTP server. You know how to do this, right? After all, that’s how you actually send every day your emails (and people wonder why you are not responding to every email).

telnet sapserver 25000

220 nplhost

helo itsme.com

250 nplhost

MAIL FROM: tobias@itsme.com

250 OK

RCPT TO: developer@mydomain.com

250 OK

Data

354 Enter mail, end with “.”

Subject: test mail

Look, I can talk with my SMTP server

.

250 OK

Connection to host lost.

/wp-content/uploads/2013/10/testsmtp1_311309.jpg

Checking inside SAP if the email was received

/wp-content/uploads/2013/10/testsmtp2_311310.jpg

Congrats in

  1. Sending email via telnet
  2. Testing your SMTP server
  3. Doing it the most boring and troublesome way

While the geek factor of sending emails via telnet is at the same level as 20 years ago – only the perception changed from: you are a hacker to: what are you doing, never heard of Outlook? – it is not really usable to reliably test a SMTP server. And it is slow. Not to mention that sending an attachment complicates everything. And you cannot load test your server.

A good, free, fast and easy to use tool to test SMTP is jMeter. jMeter can not only be used for testing web applications [1], [2], but also for other applications. SMTP is one of those. I`ll treat this in the next blog.

[1] Record Web Dynpro Java tests with jMeter

[2] Load test your web application (part 2 of 2)

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply