# Error when sending Confirmation Email on local machine

**URL:** <https://forum.litium.com/t/error-when-sending-confirmation-email-on-local-machine/1430>\
**Category:** Questions\
**Created:** [April 13, 2020, 3:20pm UTC](https://forum.litium.com/t/error-when-sending-confirmation-email-on-local-machine/1430 "2020-04-13T15:20:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![albarest](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/albarest/32/369_2.png) [@albarest](https://forum.litium.com/u/albarest)\
**Post date:** [April 13, 2020, 3:20pm UTC](https://forum.litium.com/t/error-when-sending-confirmation-email-on-local-machine/1430/1 "2020-04-13T15:20:33Z")

</div>

Order Confirmation Emails are not sent on my local machine.  
I get an exception in MailServiceImpl.cs line 314

` using (var myWebResponse = myWebRequest.GetResponse())`  
Exception:  
2020-04-13 17:03:13.0478 [App:08] [6aa4fc3c-85d0-406f-acda-423935725def] [ERROR] [] Litium.Application.Scheduler.BackgroundJobEngine - Execution of background processor Litium.Application.Scheduler.BackgroundJobWorker, Litium.Application failed, executing again in 5 seconds. System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. —\> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

We are using a self-signed certificate both locally and in the test environment.  
Is there any way to get around this without having to switch to http?

Thanks in advance

Litium version: 7.4

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [April 14, 2020, 6:45am UTC](https://forum.litium.com/t/error-when-sending-confirmation-email-on-local-machine/1430/2 "2020-04-14T06:45:42Z")

</div>

The caller that is fetching the page content is inside the `MailServiceImpl` and you can update that code to have it’s own validation logic for the certificate validation, example [https://stackoverflow.com/a/15121867](https://stackoverflow.com/a/15121867)

---

<div class="post-metadata">

**Author:** ![albarest](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/albarest/32/369_2.png) [@albarest](https://forum.litium.com/u/albarest)\
**Post date:** [April 14, 2020, 2:58pm UTC](https://forum.litium.com/t/error-when-sending-confirmation-email-on-local-machine/1430/3 "2020-04-14T14:58:27Z")

</div>

Perfect, this works. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [May 12, 2020, 2:58pm UTC](https://forum.litium.com/t/error-when-sending-confirmation-email-on-local-machine/1430/4 "2020-05-12T14:58:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
