How to send email from web app?

Hi,

I created on my web app a "Contact us" page.

On that page, I want all content filled to be sent to an email address when the user click on Submit.

I used the Outsystems email widget and filled in the necessary field.
In the email widget config, t requires me to create a email screen. I understand that email screen can be customized and all, but all i want is to be able to send the content of the form to an email address.

How do i go from here?

Here is the flow on the submit button.


You can add inputs to your email block and inside the email block (preparation) you can send the email using an action which is only available in the email block context.

Joey Moree wrote:

You can add inputs to your email block and inside the email block (preparation) you can send the email using an action which is only available in the email block context.

Hi Joey,

I can't seem to make it work.
Could you check my oml and tell me what i'm doing wrong plz?


Hi Gaelius,


What you can do is make 3 input parameters on your mail (SenderName, SenderEmail, EmailBody).

Link your input from your formfields to those parameters.

Then you can use those 3 to create ur email page just use expressions and select the right parameters  to display the information.

Does your environment has the SMTP settings configured? If so, what errors are you getting on sevice center logs?

Arley Silveira wrote:

Does your environment has the SMTP settings configured? If so, what errors are you getting on sevice center logs?


Id:
113df4ed-701a-43cb-942f-19a9a5699e50
Time of Log:
2019-03-12 09:23:38
eSpace:
SendEmail
Tenant:
SendEmail
User:

Session Id:

Server:
S4WEK-LT6AXY
Module:
Email
Message:


Error sending email 9: connection failed


Environment InformationeSpaceVer: 0 (Id=0, PubId=0, CompiledWith=11.0.118.0)
RequestUrl:  (Method: )
AppDomain: Scheduler.exe
Path: C:\...\PS\
Locale:
DateFormat: yyyy-M-d
PID: 4404 ('Scheduler', Started='3/8/2019 2:19:58 PM', Priv=76Mb, Virt=698Mb)
TID: 13
Thread Name: Email Processor #1
.NET\: 4.0.30319.42000
Stack:
Error sending email 9: connection failed
   at #jxc.#ixc.#hxc(String smtpserver, Int32 smtpserverport, #txc authType, String username, String password, String mail, String from, String to, String cc, String bcc, Int32 sendTimeout, Int32 receiveTimeout)
   at OutSystems.Scheduler.Core.EmailJob.#Rwc()
   at OutSystems.Scheduler.Core.EmailJob.Execute()
   at OutSystems.Scheduler.Core.SchedulerProducerConsumer`1.Execute(Job job)


Solution
Solution

Gaelius Novachrono wrote:

Arley Silveira wrote:

Does your environment has the SMTP settings configured? If so, what errors are you getting on sevice center logs?


Id:
113df4ed-701a-43cb-942f-19a9a5699e50
Time of Log:
2019-03-12 09:23:38
eSpace:
SendEmail
Tenant:
SendEmail
User:

Session Id:

Server:
S4WEK-LT6AXY
Module:
Email
Message:


Error sending email 9: connection failed


Environment InformationeSpaceVer: 0 (Id=0, PubId=0, CompiledWith=11.0.118.0)
RequestUrl:  (Method: )
AppDomain: Scheduler.exe
Path: C:\...\PS\
Locale:
DateFormat: yyyy-M-d
PID: 4404 ('Scheduler', Started='3/8/2019 2:19:58 PM', Priv=76Mb, Virt=698Mb)
TID: 13
Thread Name: Email Processor #1
.NET\: 4.0.30319.42000
Stack:
Error sending email 9: connection failed
   at #jxc.#ixc.#hxc(String smtpserver, Int32 smtpserverport, #txc authType, String username, String password, String mail, String from, String to, String cc, String bcc, Int32 sendTimeout, Int32 receiveTimeout)
   at OutSystems.Scheduler.Core.EmailJob.#Rwc()
   at OutSystems.Scheduler.Core.EmailJob.Execute()
   at OutSystems.Scheduler.Core.SchedulerProducerConsumer`1.Execute(Job job)



You are either missing or having wrong configuration of your smtp details on sc. Or maybe the smtp server ia down.

ragul sp wrote:

Hi Gaelius,

I hope you are getting configuration error just as Arley mentioned. Can you refer to the following URLs (https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/Configure_OutSystems_to_Send_Emails
 https://www.outsystems.com/forums/discussion/35624/email-smtp-imap/
https://www.outsystems.com/forums/discussion/40383/error-sending-email-with-correct-smtp-configuration/) and see whether your problem is getting resolved? 


Thanks,

Ragul

Thanks to you all for your help, especially Ragul and Arley.

It was indeed an error in my smtp config, I had made a typo in the port number, hence why the errors.


Also, since I was using gmail, I had to go to my google account and move a few things around.
See referal post: https://www.outsystems.com/forums/discussion/40383/error-sending-email-with-correct-smtp-configuration/#Post145220