Error creating Email

Error creating Email

  
Hi.
I configured e-mail in Service Center and when i try to send email give me error: "Error creting email. the remote server returned an error:(500) internal server error"
I'm using outsytems 6.0. and already worked...
Can you help me?

Thanks
Hi Vera

If the Email creation is generating a 500 server, it means that the email screen that you're using is generating an error. Being a HTTP 500 server, it seems to be an application error, so it should be logged on the Service Center. So when the error occurs, check the Service Center error log for additional errors around the same time period.

Cheers

Miguel Simões João
Hi Miguel.
The error detail is :

Message:
Error creating Email. The remote server returned an error: (500) Internal Server Error.

Stack:
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, String emailDefSSKey, Boolean storeContent, EmailType type) On
at OutSystems.HubEdition.RuntimePlatform.Email.EmailProcessor.SendEmailRequest(String url, String from, String to, String cc, String bcc, Int32 activityId, String emailDefSSKey, Boolean storeContent, EmailType type)
at ssProfClasse.Flows.FlowMainFlow.ScrnDiario.CommandSendMail_Ajax(HeContext heContext)
-Env-
eSpaceVer: 4 (Id=16, PubId=17, CompiledWith=6.0.0.4)
RequestUrl: http://localhost/ProfClasse/Diario.aspx
AppDomain: /LM/W3SVC/1/ROOT/ProfClasse-21-129554591787800028
FilePath: C:\...\PS\running\ProfClasse.2140118110\Diario.aspx
Locale: en-US
DateFormat: yyyy-MM-dd
PID: 2648 ('w3wp', Started='15-07-2011 17:28:14', Priv=277Mb, Virt=2973Mb)
TID: 120
.NET: 2.0.50727.5446

Can you help me?

Thanks
Hi Vera

But do you have any other error on the error logs around the same time instant? Or you have only one error logged?

Cheers

Miguel Simões João
Hi Miguel.
I have 4 errors. In the attached files are the errors that have the same hours
I hope that helps.

Thanks
Hello Vera

The errors you've provided shows that there's an error getting the user information using the session variable user on the MailDiario screen, which suggests that you're attempting to use a session variable on an email screen, where in fact there's no session.

You see, emails are sent by calling the respective email screen in background, which means that it's not the web browser that calls the email screen, and thus it doesn't share the same web session. As such, any session variable within the email screen is empty, and shouldn't be used. Timers also work this way.

If you need to access the user information inside an email screen, you'll need to pass the user id as an input parameter to the email screen node.

Cheers

Miguel Simões João