Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
clodagh_walls
Explorer
In this blog I would like to cover some checkpoints for successfully configuring the SBO Mailer Service in SAP Business One. These are based on Partner questions that SAP Business One Support receive.We will go through the Job Service Configuration, what to configure in the SAP Business One Client, simple tests to check the SMTP Setup and Port, Top tips when sending emails with attachments and finally some additional important check points.

Setting up the SBO Mailer Service allows the user to send an email directly from the SAP Business One application.

The best starting point is the SAP Business One Administrator's Guide for both MSSQL and SAP HANA which has step by step instructions on how to configure the service correctly, we will look at some of it in detail.

Let’s begin by checking the configuration on the Job Service page/Mailer Settings Tab for SAP Business One version for SAP HANA.

  1. Fill all fields with Email Server Credentials and click the Save button.

  2. The status must be “Running”.

  3. If you change the Email Credentials, you need to restart the Mailer Service by clicking the Stop and start buttons in the Status field.

  4. To test the connection to the Mail Server you can use the Test Connection button. If connected successfully the result is OK.



If using SAP Business One on MSSQL Open the SAP Business One Service Manager, choose Job Service- Mailer Service and click on the settings button.




  • The service must be “Running” on the initial SAP Business One Service Manager Screen

  • Make sure the SAP Business One Messaging Service is running from windows services.

  • Fill in the fields with Email Server Credentials.

  • Once you select the SMTP Client with See4C, the Test Connection button will be enabled.

  • If the SMTP server requires some authentication, but you selected No Authentication, the test connection will be successful. However, no emails will be sent.

  • When connected successfully the result is OK.

  • To confirm all the settings are correct, you can check the mailer configuration with any third-party email client for example MS Outlook or Thunderbird.


Let's now look at the settings we need to configure in the SAP Business One Client

  • Go to Administration > System Initialization > General Settings > Services Tab.

  • Check the options “Enable Mailer Service

  • You should only use the “Enable Company Specific Mailer Configuration” if each Company Database is using a separate Email System.

  • If the “Enable Company Specific Mailer Configuration” option is checked, fill in the email credentials and click the Update button.





  • Define the user’s email address in Administration → Setup → General → Users.


If you are using Gmail or Office365, you need to use the same email address for the user which you have used in the mailer configuration. The company's E-Mail address in Administration → System Initialization → Company Details. is used by the Alert Management only when sending out alerts via E-Mail.

  • Define the path to attachments in Administration → General Settings → Path Make sure that the path to the Attachments folder is correctly defined.
    It needs to be setup on a shared folder on the SERVER machine which can be accessed by all users, for example \\servername\sharefolder


Now let's move to some simple tests you can perform to make sure the SMTP Setup and your Port Settings are correct

A simple test to check if your mailer settings are correct is to use Gmail.

You can configure your SAP Business One Mailer with the following Gmail settings, also mentioned in SAP Note: 2340580




  • Make sure to enable the option “Use TLS Encryption” in the configuration.

  • Enable the option “Allow Less Secure Apps” for your Gmail account.

  • Make sure that there is no additional security enabled on your Gmail account.


You can also use a simple Power Shell script to check your SMTP Connection Configuration

Follow the steps below on the server where SBO Mailer is currently installed:



    1. Open Notepad with run as an administrator.

    2. Copy the power shell script below and paste it into the Notepad file.

    3. Add the values relevant to your G-mail account and save the file with a "ps1" extension.

    4. Right-click the file and choose run with power shell. If the email configuration setup is correct, you will receive the email.




Power shell script:
$EmailTo = "testmail@gmail.com"

$EmailFrom = "testmail@gmail.com"

$Subject = "Test Mail"

$Body = "Test Body"

$SMTPServer = "smtp.gmail.com"

$SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom,$EmailTo,$Subject,$Body)

$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)

$SMTPClient.EnableSsl = $true

$SMTPClient.Credentials = New-Object System.Net.NetworkCredential("testmail@gmail.com", "Password");

$SMTPClient.Send($SMTPMessage)

NOTE: If this power shell script does not send any emails, then you need to check the SBO Mailer configuration with your IT department.

Finally make sure the mailer configuration has the correct port number.

  • The most common ports are 25, 465 and 587.

  • Every email provider (Public, Private or Exchange Server) should define the SMTP Server and port number which should be used within the mailer application.


Let’s now look at the key points to check If you have trouble sending emails with attachments.

  • Double check the path to the attachment location in Administration → General Settings → Path It must be correctly defined.

  • The Attachments folder path needs to be set on a shared folder on the SERVER machine which can be accessed by all users for example \\servername\sharefolder


Note: Group Everyone should have FULL access control to the shared folder.

If you are facing issues when creating and configuring the Attachment Folder to send emails, please check the following SAP Notes:

  • SAP Note:1856172 - Set Up a Shared Folder on a MS Windows Machine to Send Mail with Attachments

  • SAP Note:2091232 - How to Set Up SAP Business One Mailer, Version for SAP HANA to Send Emails with Attachments


Additional configuration checks.

Information on how to reinstall the services and further common scenarios can be found in our SAP Note: 2340580 Troubleshooting SBO Mailer in SAP Business One.

In certain scenarios, there is a need to reinstall the Service, we have that covered in the following notes:

  • For MSSQL Server Environment: Refer to SAP Note: 2788059

  • For SAP HANA Environment: Refer to SAP Note: 2538555


I hope this blog covers some of your SAP Business One Mailer questions, if you need to reach out to us create a support incident using the component SBO-BC-SRV-MSG. Make sure to attach the following logs to the incident.

  • For MS SQL Environment:

  • B1MailLog file from "C:\Windows\SysWOW64".

  • C:\Program Files (x86)\SAP\SAP Business One ServerTools\Common\tomcat\logs

  • For SAP HANA Environment:

    • /usr/sap/SAPBusinessOne/Common/tomcat/logs/

    • /var/log/SAPBusinessOne/ServerTools/Mailer/



  • Event viewer logs for SBOMail.


Support Spotlight Series

We hope this read has been informative and beneficial. For more blog posts and tips from the SAP Business One Support team, please visit our space on the communities: https://blogs.sap.com/tag/b1-support-spotlight/

For questions about SAP Business One, please submit your question here.