05-19-2023 04:14 AM
I have just installed Data Import Schedule Manager and been through the set-up to create the tables. Now when I create a new Email Template and select "Send Email Preview" I receive an error "Error: Preview email not sent". Any idea what might be causing this? Is there other configuration that needs to be done to enable the sending of emails? This is a cloud deployment of OneStream and the first time we are looking at email notifications. Thanks.
05-19-2023 11:55 AM
Hi Carlw!
Do you have a setting somewhere that is pointing to the "OneStream Email". Or do you see the "OneStream Email" under data adaptor under external table SQL?
05-22-2023 04:57 AM
Hi, yes, in the Global Settings of Data Import Schedule Manager, I have the Email Connection set to "OneStreamEmail". That's the only option available in the drop-down. And, yes, that is also available as an External Database Connection in Data Adapters. Regards, Carl.
05-22-2023 07:21 AM
Is that configured correctly? You can look at the settings of that from the environment tab.
05-22-2023 08:30 AM
This is what is configured:
05-22-2023 08:56 AM
I thought it shows the connection string there. Can you look at the system log and see what the detailed error message is?
05-22-2023 09:42 AM
Hi - the System Error Log doesn't provide any additional detail, just a description of "Exception Creating and Sending Email" which is the Exception Message generated by the DSM_SolutionHelper Extender rule.
05-22-2023 09:56 AM
Hey CarlW,
If i were you I would test the Email of OneStreamEmail. You could create a BR extender rule and simply adjust the code below after adapting it to your needs. The idea is to receive and email from that.
Imports System
Imports System.Collections.Generic
Imports System.Data
Imports System.Data.Common
Imports System.Globalization
Imports System.IO
Imports System.Linq
Imports System.Windows.Forms
Imports Microsoft.VisualBasic
Imports OneStream.Finance.Database
Imports OneStream.Finance.Engine
Imports OneStream.Shared.Common
Imports OneStream.Shared.Database
Imports OneStream.Shared.Engine
Imports OneStream.Shared.Wcf
Imports OneStream.Stage.Database
Imports OneStream.Stage.Engine
Namespace OneStream.BusinessRule.Extender.HAK_SendEmail
Public Class MainClass
Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As ExtenderArgs) As Object
Try
'Connection to the mail server (Defined in Application Server setup)
Dim emailConnectionName As String = "OnestreamEmail"
'Email content (Subject & Body)
Dim subject As String = "Test OS Email"
Dim messageBody As String = "Do you Get that email? "
'Add email addresses
Dim toEmail As New List(Of String)
Dim userEmailAddress1 As String = "UpdateThisPerson@domain.com"
'Marc Roest <marc.roest@finext.nl>
toEmail.Add(userEmailAddress1)
''Add Attachments
Dim attachments As New List(Of String)
Dim fileAttachmentPath As String '= "\\Server\Folder\FileName.txt"
If File.Exists(fileAttachmentPath) Then
attachments.Add(fileAttachmentPath)
End If
'Send the message
BRApi.Utilities.SendMail(si, emailConnectionName, toEmail, subject, messageBody, attachments)
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
End Class
End Namespace
05-22-2023 10:31 AM
Thanks for that - I'm getting "The SMTP server requires a secure connection or the client was not authenticated. The server response was: Authentication required". I guess I need to get OneStream to do some configuration to enable email.
05-22-2023 10:56 AM
At this point, I would contact OneStream Support. https://onestreamsoftware.service-now.com/
05-25-2023 06:10 AM
Thanks - I have raised a ticket on ServiceNow.