Solved

IFS doesn't send emails using event

  • 14 November 2023
  • 10 replies
  • 266 views

Userlevel 7
Badge +22
  • Superhero (Customer)
  • 949 replies

Dear community,

generally we can send emails from IFS. For example if we create a subscription, send a document via email etc.

But it doesn’t send emails for events.

Can anyone help?

icon

Best answer by Marcel.Ausan 15 November 2023, 13:40

View original

10 replies

Userlevel 6
Badge +15

@Link if you think you have properly setup the event action, please check if there’s any Application Messages generated. Normally all event actions of type Email will create an Application Message to push the email through the smtp server. Maybe the Application Messages are in failed status due to some errors.

 

Also, would be useful to leave a printscreen of your event action.

Userlevel 5
Badge +14

@Link Hi,

 

Can you try the PLSQL block below? This is the procedure that is working under the email events. If it is not working you should check Connector Senders.

 

BEGIN
ifsapp.command_sys.mail(from_user_name_ => 'IFSAPP',
to_user_name_ => 'yyyy@xxx.com.tr',
text_ => 'Test!'
);
END;

 

 

Userlevel 7
Badge +22

@Link if you think you have properly setup the event action, please check if there’s any Application Messages generated. Normally all event actions of type Email will create an Application Message to push the email through the smtp server. Maybe the Application Messages are in failed status due to some errors.

 

Also, would be useful to leave a printscreen of your event action.

Hi @Marcel.Ausan 

I’ve just created a simple event for testing and also the mail sender looks good.

But IFS doesn’t create an application message.

Userlevel 7
Badge +22

@Link Hi,

 

Can you try the PLSQL block below? This is the procedure that is working under the email events. If it is not working you should check Connector Senders.

 

BEGIN
ifsapp.command_sys.mail(from_user_name_ => 'IFSAPP',
to_user_name_ => 'yyyy@xxx.com.tr',
text_ => 'Test!'
);
END;

 

 

Hi @hhy38 

thank you for the sql code. It doesn’ work.

This means somethink is worng with my connector sender, right?

 

Userlevel 6
Badge +15

@Link either way an application message should be generated.

The flow is:

→ event action of type Mail triggered

    → Application Message created and queued

       → Application Message will invoke the Mail Sender to finally push the email to the SMTP server.

If there is an issue with the Mail Sender, you should see the error message in the application message.

 

The fact that there’s no application message makes me think there could be 2 options

  • event action never gets triggered (maybe wrong conditions or inactive 😁)
  • some environment issues which i guess should be reported to IFS for further checking
Userlevel 5
Badge +14

@Link You are welcome. Yes, probably the default mail sender has a problem. Because this code uses the default mail sender. There can be a lot of mail senders. If all of them not working, it can be related to the mail service. If some of them working. Then you should check your sender configuration.

 

Userlevel 7
Badge +22

@Link either way an application message should be generated.

The flow is:

→ event action of type Mail triggered

    → Application Message created and queued

       → Application Message will invoke the Mail Sender to finally push the email to the SMTP server.

If there is an issue with the Mail Sender, you should see the error message in the application message.

 

The fact that there’s no application message makes me think there could be 2 options

  • event action never gets triggered (maybe wrong conditions or inactive 😁)
  • some environment issues which i guess should be reported to IFS for further checking

Hi @Marcel.Ausan 

yes, that is true. The event action never gets triggered cause of wrong conditions.

Thank you a lot. 😀

Userlevel 5
Badge +14

@Link Iskender 

I'm glad you found the solution. :) But, I wonder why the code didn’t work. Did you Commit the transaction after executing the code?

 

Userlevel 7
Badge +22

@Link Iskender 

I'm glad you found the solution. :) But, I wonder why the code didn’t work. Did you Commit the transaction after executing the code?

 

Hi @hhy38 

yes, I totally forgot it. It is a good question. 😊

I don’t know.

Maybe I should test it again. 😁

Userlevel 7
Badge +22

Hi @hhy38 

the code also works after correcting the condition in the event.

Thank you for supporting. ✌🏼

Reply