How to connect send email web sever action (SendEmailDemo) with mobile app

Hi all,

I have a send email by web server action, I can send email by website (Link)

Now I need call SendEmailDemo server action by mobile app, I don't know how to connect?

Can you help me?




Hi Vinh,

You can check out this demo application in the Forge in order to understand how to send emails from Mobile Apps. It's basically the same thing as applies for Reactive Web Apps.

Also, here's another post that explains the steps.

Regards,

Nordin

Nordin Ahdi wrote:

Hi Vinh,

You can check out this demo application in the Forge in order to understand how to send emails from Mobile Apps. It's basically the same thing as applies for Reactive Web Apps.

Also, here's another post that explains the steps.

Regards,

Nordin

Hi Nordin Ahdi

Thank you for your support,

I was download demo application, but can't open it:

"You are trying to Upload or Publish a Solution that was created in a Platform Server with a different License than Development and its Intellectual Property is Protected.<br/>You cannot Upload or Publish Solutions with Protected Intellectual Property that were created in Platform Servers with a License different than the Development one."


Hi Vinh,

That's weird. It seems to be IPP protected which should not be the case if an application is uploaded to either the Forge or the Community Forum. I'll try to upload the OSP-file here again in order to see if the IPP protection is removed.

Please also post this error in the Forge discussion section of this component in order to notify the creator of the component and allow her to fix it.

Regards,

Nordin

Nordin Ahdi wrote:

Hi Vinh,

That's weird. It seems to be IPP protected which should not be the case if an application is uploaded to either the Forge or the Community Forum. I'll try to upload the OSP-file here again in order to see if the IPP protection is removed.

Please also post this error in the Forge discussion section of this component in order to notify the creator of the component and allow her to fix it.

Regards,

Nordin

Hi Nordin Ahdi,

Download OSP-file here again, i have same this error. But my mobile app could send email, because Create Email Template in Web Application I used Expression, delete Expression after, I can send email by my mobile app.

Thank you for your support.


Hi Vinh,

So it didn't help to upload the OSP in this forum post as an attempt to remove the IPP protection. Like I said please let the creator of the Forge component know what's going on.

To go back to your initial problem, have you tried the steps described in this post?

Also I noticed you have created an ErrorMessage and Success input parameter for your SendEmailDemo server action. These should be output parameters which needs to be assigned accordingly after the SendEmailTest action. This way the calling client action from your mobile app can act upon the outcome of the SendEmailDemo server action output.


Regards,

Nordin

Hi Vinh,

Our posts have crossed each other :).

I see you have got it working. I'm glad you've figured it out.

Indeed using the GetUserId() function inside the email widget would not work, since you cannot rely on session data inside an email widget. Emails are being sent asynchronously and therefore run in a different session. 

If you want to show the user's name inside an email, you have to create an input parameter for it and pass GetUser(GetUserId()).User.Name to the input parameter of the Send Email tool. Inside the email widget you can use that input parameter inside an expression in order to display the user name.

Hope this makes it more clear.

Regards,

Nordin

P.S.: again, please mark the answer as solution that helped you the most.