958
Views
23
Comments
Solved
Error Sending Email

Hello,


When i try to send the email, i getting this error:

In my ServiceCenter configuration i has this:


and i put the e-mail and password correct and i put the option "Less Secure Apps" in "On"


can someone help me?


Many Thanks


2020-02-28 09-46-54
Eduardo Jauch
Solution

Thiago,

Yes, this is an error from gmail.
He is not allowing you to send the email.

If I am not wrong, the mail sender also needs to be approved: https://support.google.com/mail/answer/22370?hl=en

Are you sending from the mail of the account being used or a different one?

Cheers


2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

Thiago,

Yes, this is an error from gmail.
He is not allowing you to send the email.

If I am not wrong, the mail sender also needs to be approved: https://support.google.com/mail/answer/22370?hl=en

Are you sending from the mail of the account being used or a different one?

Cheers



Yes i'm, as you can see in configuration

2020-02-28 09-46-54
Eduardo Jauch

Thiago Mari wrote:

Eduardo Jauch wrote:

Thiago,

Yes, this is an error from gmail.
He is not allowing you to send the email.

If I am not wrong, the mail sender also needs to be approved: https://support.google.com/mail/answer/22370?hl=en

Are you sending from the mail of the account being used or a different one?

Cheers



Yes i'm, as you can see in configuration

I think I wasn't clear.

The sender of the mail (you define in the SendMail statement) or the default mail must be enabled in the gmail account. Otherwise, the gmail will prevent it from being sent due security issues with impersonating, etc.

So, the email you're trying to send, the sender is the gmail account you setup or is a different one? (From the configuration image you showed is not possible to see that).

Cheers.


2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

Thiago Mari wrote:

Eduardo Jauch wrote:

Thiago,

Yes, this is an error from gmail.
He is not allowing you to send the email.

If I am not wrong, the mail sender also needs to be approved: https://support.google.com/mail/answer/22370?hl=en

Are you sending from the mail of the account being used or a different one?

Cheers



Yes i'm, as you can see in configuration

I think I wasn't clear.

The sender of the mail (you define in the SendMail statement) or the default mail must be enabled in the gmail account. Otherwise, the gmail will prevent it from being sent due security issues with impersonating, etc.

So, the email you're trying to send, the sender is the gmail account you setup or is a different one? (From the configuration image you showed is not possible to see that).

Cheers.


I have one e-mail in sender and another in Email Widget (field To)


2018-12-11 13-32-05
Martijn Habraken

Hi Thiago,
Can you look for this error in Service Center and give a more detailed error stack trace. It looks like the SMTP server is returning an error.

Kind regards,
Martijn Habraken

2022-03-01 15-42-44
Thiago Mari
Champion

Martijn Habraken wrote:

Hi Thiago,
Can you look for this error in Service Center and give a more detailed error stack trace. It looks like the SMTP server is returning an error.

Kind regards,
Martijn Habraken


here the print:


2020-02-28 09-46-54
Eduardo Jauch

You need to enable your "application" in gmail configuration for him to allow you to send the mail.

https://support.google.com/accounts/answer/6010255?hl=en

Cheers.

2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

You need to enable your "application" in gmail configuration for him to allow you to send the mail.

https://support.google.com/accounts/answer/6010255?hl=en

Cheers.


I already do that

2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

You need to enable your "application" in gmail configuration for him to allow you to send the mail.

https://support.google.com/accounts/answer/6010255?hl=en

Cheers.

if you prefer read:


Error of Service Center

Error creating Email. The remote server returned an error: (500) Internal Server Error.
   at System.Net.HttpWebRequest.GetResponse()
   at OutSystems.HubEdition.RuntimePlatform.Email.EmailHelper.HttpGetContent(String ssUrl, String method, String contentType, String userAgent, Cookie cookie, QueryParameter[] parameters, String& ssContent, String& ssContentEncoding)
   at OutSystems.HubEdition.RuntimePlatform.Email.EmailHelper.HttpPost(String ssUrl, QueryParameter[] parameters, String userAgent, Cookie cookie, String& ssContent, String& ssContentEncoding)
   at OutSystems.HubEdition.RuntimePlatform.Email.EmailProcessor.SendEmailRequest(String url, String from, String to, String cc, String bcc, Int32 activityId, Int32 tenantId, Boolean storeContent, EmailType type) On 
   at OutSystems.HubEdition.RuntimePlatform.Email.EmailProcessor.SendEmailRequest(String url, String from, String to, String cc, String bcc, Int32 activityId, Int32 tenantId, Boolean storeContent, EmailType type)
   at ssAgent_CS.Actions.ActionCreateInvite(HeContext heContext, Int32 inParamUserId, Int32 inParamInviteType)
   at ssAgent_CS.Actions.ActionCreateOrUpdateAgents(HeContext heContext, Int32 inParamUserID, ENUserEntityRecord inParamUser, ENAgentDetailsEntityRecord inParamUserDetails, Int32& outParamUserIdOutput)
   at ssAgent_CW.RsseSpaceAgent_CS.MssCreateOrUpdateAgents(HeContext heContext, Int32 inParamUserID, IRecord inParamUser, IRecord inParamUserDetails, Int32& outParamUserIdOutput)
   at ssAgent_CW.Flows.FlowAgents.WBlkAgentDetail.CommandSave(HeContext heContext)


2020-02-28 09-46-54
Eduardo Jauch
Solution

Thiago,

Yes, this is an error from gmail.
He is not allowing you to send the email.

If I am not wrong, the mail sender also needs to be approved: https://support.google.com/mail/answer/22370?hl=en

Are you sending from the mail of the account being used or a different one?

Cheers


2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

Thiago,

Yes, this is an error from gmail.
He is not allowing you to send the email.

If I am not wrong, the mail sender also needs to be approved: https://support.google.com/mail/answer/22370?hl=en

Are you sending from the mail of the account being used or a different one?

Cheers



Yes i'm, as you can see in configuration

2020-02-28 09-46-54
Eduardo Jauch

Thiago Mari wrote:

Eduardo Jauch wrote:

Thiago,

Yes, this is an error from gmail.
He is not allowing you to send the email.

If I am not wrong, the mail sender also needs to be approved: https://support.google.com/mail/answer/22370?hl=en

Are you sending from the mail of the account being used or a different one?

Cheers



Yes i'm, as you can see in configuration

I think I wasn't clear.

The sender of the mail (you define in the SendMail statement) or the default mail must be enabled in the gmail account. Otherwise, the gmail will prevent it from being sent due security issues with impersonating, etc.

So, the email you're trying to send, the sender is the gmail account you setup or is a different one? (From the configuration image you showed is not possible to see that).

Cheers.


2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

Thiago Mari wrote:

Eduardo Jauch wrote:

Thiago,

Yes, this is an error from gmail.
He is not allowing you to send the email.

If I am not wrong, the mail sender also needs to be approved: https://support.google.com/mail/answer/22370?hl=en

Are you sending from the mail of the account being used or a different one?

Cheers



Yes i'm, as you can see in configuration

I think I wasn't clear.

The sender of the mail (you define in the SendMail statement) or the default mail must be enabled in the gmail account. Otherwise, the gmail will prevent it from being sent due security issues with impersonating, etc.

So, the email you're trying to send, the sender is the gmail account you setup or is a different one? (From the configuration image you showed is not possible to see that).

Cheers.


I have one e-mail in sender and another in Email Widget (field To)


2020-02-28 09-46-54
Eduardo Jauch

The default sender will be used only if you don't fill the From of the SendMail statement.

If the one used is not the same mail you used for the gmail setup of the smtp, the gmail will not allow you to send the mail.
In order for you to be able to use this mail (if different from the gmail account you used in the SMTP setup), you need to enabled this mail to send emails for this gmail account, in the gmail account (link I posted before).

The email you use in the From or Default sender is the same as the one you used as user/pass for the smtp configuration?

Cheers.

2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

The default sender will be used only if you don't fill the From of the SendMail statement.

If the one used is not the same mail you used for the gmail setup of the smtp, the gmail will not allow you to send the mail.
In order for you to be able to use this mail (if different from the gmail account you used in the SMTP setup), you need to enabled this mail to send emails for this gmail account, in the gmail account (link I posted before).

The email you use in the From or Default sender is the same as the one you used as user/pass for the smtp configuration?

Cheers.


Hi,


yes is the same, i not put in widget any email in field From, and the username and the default email was the same in service center


2020-02-28 09-46-54
Eduardo Jauch

Ok, 

I just tested.
Gmail will not send the email if you don't put a sender FROM in the SendMail statement.

This solved the problem in my test here.

Cheers.

2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

Ok, 

I just tested.
Gmail will not send the email if you don't put a sender FROM in the SendMail statement.

This solved the problem in my test here.

Cheers.

Here?

2020-02-28 09-46-54
Eduardo Jauch

Yes. In the FROM field. You need a sender there, that is the same as the account you use in the SMTP or that is enabled in the account.

2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

Yes. In the FROM field. You need a sender there, that is the same as the account you use in the SMTP or that is enabled in the account.

i already put as you can see, and appear the error mesage



The same email in configuration:



2020-02-28 09-46-54
Eduardo Jauch

Sorry Thiago.

If you enabled in gmail account the less secure option, and is using in the sender of  the SendMail the same account, the only other thing I can think of is that you typed the wrong password...

Here it is working as expected. Gmail account, same configuration.

Your's a cloud environment? Enterprise or Personal? I tested in Personal. Should work on both.

2020-02-28 09-46-54
Eduardo Jauch

Can you try this account at your personal to see if it works?

2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

Can you try this account at your personal to see if it works?

In my personal was working, but in work server was not


2020-02-28 09-46-54
Eduardo Jauch

The server is a cloud or an onpremises?
Is it behind firewall, proxy, etc?
Maybe the infrastructure is blocking your mail somehow?

2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

The server is a cloud or an onpremises?
Is it behind firewall, proxy, etc?
Maybe the infrastructure is blocking your mail somehow?

i guess is blocking but is weird because i can send "normaly" email but using the widget from my page i can not..



2020-02-28 09-46-54
Eduardo Jauch

That's because it is not your page that is sending the mail, but the server.
If the server firewall, etc, is blocking the port or something like that, you will not be able to send the mail than.

2022-03-01 15-42-44
Thiago Mari
Champion

Eduardo Jauch wrote:

That's because it is not your page that is sending the mail, but the server.
If the server firewall, etc, is blocking the port or something like that, you will not be able to send the mail than.

maybe that, anyway, many thanks to help!!


Cheers


2020-02-28 09-46-54
Eduardo Jauch

Not a problem.

Sorry for not being able to help you find an easy solution.
Check with yout infra-structure team if they can see what is blocking the mail.

Cheers!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.