Highlighted
estelle_yang Super Contributor.
Super Contributor.
306 views

(SM) Support Tip: Survey email cannot be sent out

In SM9.5x application, JavaMail is the email solution based on event services.

http://helpserver.hpeswlab.net/SM9.5x_Codeless/Content/integrations/event_services/concepts/sm_email_solutions.htm

You need to configure emailout parameter to setup outbound email.

http://helpserver.hpeswlab.net/SM9.5x_Codeless/Content/smartemail/tasks/set_up_outbound_email.htm

To make SM Survey feature work, you need to set up HTML Email (JavaMail) by configuring the required emailout parameters.

http://helpserver.hpeswlab.net/SM9.5x_codeless/Content/survey/Tasks/internal_survey_set_up_html_email.htm

It is better to define a dedicate log file for outbound email, such as:

sm -emailout -log:../logs/email.log

For other JavaMail connection parameters you could refer to:

http://helpserver.hpeswlab.net/SM9.5x_Codeless/Content/parameters/reference/parameter_emailout.htm

When survey notification email went wrong, you may check the log of the outbound email defined in configuration file.

In this scenario, we found following error messages as below:

org.apache.commons.mail.EmailException: javax.mail.internet.AddressException: Missing final '@domain' in string ``{}''

at org.apache.commons.mail.Email.createInternetAddress(Email.java:1864)

at org.apache.commons.mail.Email.addCc(Email.java:941)

at org.apache.commons.mail.Email.addCc(Email.java:924)

at org.apache.commons.mail.Email.addCc(Email.java:874)

From above log, we know that the issue is related to addcc field.

It’s a new feature introduced in 9.5x application:

http://helpserver.hpeswlab.net/SM9.5x_Codeless/Content/integrations/event_services/concepts/support_of_bcc_cc_fields_in_outbound_emails.htm

To resolve this issue, you could try following steps:

1> Type “sl” in command window, find Script Library record “Survey_Connector_URL”

2> Locate the function: sendEmail: function( recipient, subject, emailBody )

Add last 2 lines as below:

email["user.to"] = recipient;

email["user.from"] = system.functions.operator();

email["date.to.send"] = system.functions.tod();

email["status"] = "sent";

email["subject"] = subject;

email["application"] = "email";

email["text"].push(emailBody);

email["user.array"][0] = recipient;

email["ccuser.array"] = {};

email["bccuser.array"] = {};

3> Trigger a new survey notification email, see if user can receive it.

Labels (1)
1 Reply
Super Contributor.. bogart Super Contributor..
Super Contributor..

Re: (SM) Support Tip: Survey email cannot be sent out

The last two lines should be:

email["bccuser.array"] = null;
email["ccuser.array"] = null;

That's working for me! 🙂

Bo

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.