413
Views
9
Comments
Error creating Email. The remote server returned an error: (404) Not Found.
Question

Whenever the system tries to send out a new "connection" email that I added, it returns this error. I have tried changing the actual email it sends to a "forgot password" email from the same module (the "forgot password" email works without issues in the screen that uses it normally), as well as creating a blank email with a simple text string for it to send. Both of those return the same result. It appears to not matter which method I put the email action in either, as it fails in all of them. Service center is properly configured with SMTP settings, and I verified that the email does not have any functions inside of it (one post mentioned that functions could cause the problem I am seeing). I can't figure out why the "forgot password" emails work in the same module, but this one always fails since they are essentially configured the exact same. Here is the stack trace from the error:

Error creating Email. The remote server returned an error: (404) Not Found.
   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 ssZDHCGateway.Actions.ActionSendConnectionEmail(HeContext heContext, String inParamConnectingOrgGUID, String inParamRequestingOrgGUID)


2021-08-12 11-00-27
Nordin Ahdi
 
MVP

Hi William,

Is it possible your “connection” email contains an image or another attachment like a file maybe, which cannot be found by the server while trying to create and send the email?

Maybe some of the suggestions in this post can help you figure it out.

Regards,

Nordin


UserImage.jpg
William Brooksby

That was my initial thought, but the email template is the same one used by the "forgot password" email. Sending a blank email with just text and no images also got the same result unfortunately. 

2021-08-12 11-00-27
Nordin Ahdi
 
MVP

Let me ask you another question.

Do you have any deployment zones configured in your environment? 

2021-08-12 11-00-27
Nordin Ahdi
 
MVP

I asked you this question since deployment zones have some limitations with regard to creating and sending emails.

This post (point 2) helps you understand these limitations.

UserImage.jpg
William Brooksby

I know we have different servers that we can deploy to, but from the little bit I read on deployment zones just now I am not certain if we deployment zones. I don't see any options for deployment zones in service center (for adding a new one, or configuring an application to use a specific one), but I will check with some team members who have more access and see if they know of any.

2021-08-12 11-00-27
Nordin Ahdi
 
MVP

Deployment zones can be found in Service Center under the Administration menu >> Deployment Zones.

Furthermore also in Service Center, when selecting the Factory menu, under each application detail screen you can find an Operation tab under which a deployment zone can be configured (default is Global zone).

UserImage.jpg
William Brooksby

I was able to check with a different person who has more access, and we don't have any deployment zones set up (it is just using the default global zone).

2021-08-12 11-00-27
Nordin Ahdi
 
MVP

Hi William,

I'm not sure then. The post around the same issue that I've shared with you earlier mentions this problem in relation with SEO rules. Maybe it is something you can look into.

In any case, I would suggest you to look into the IIS logs and Event Viewer logs on the server to see what kind of error gets logged at the same time of the Creating Email error.

Here's an article that helps you understand how OutSystems handles the Email sending. Maybe it can be useful in order to identify the probem.

And if nothing helps, it is always a good idea to contact OutSystems Support and ask them to help.

Regards,

Nordin


2021-09-10 14-03-53
Salman Ansari

Hi William,

Please try below once.

You could try to set the email in another eSpace and call that email trough a public action?



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