Email Settings Error

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
DBounlom
Lieutenant (LT)
Lieutenant (LT)
Posts: 62
Joined: Wed Sep 09, 2009 1:26 pm

Email Settings Error

Post by DBounlom » Mon Sep 21, 2009 3:44 pm

I am getting the following error whenever I try to configure my email settings.

"Server configuration was updated but the test resulted in error: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

1. SMTP Server: smtp.gmail.com
2. SMTP Port: 465 (I have tried 587 and even 993 as well)
3. Enable SSL: yes
4. SMTP Username: XXX
5. SMTP Password: XXX
6. Use Authentication: Yes

ASP.net is running under a medium trust environment. Does anyone know how to fix this problem? Thanks.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Email Settings Error

Post by mazhar » Fri Sep 25, 2009 4:38 am

I haven't seen this sort or problem reported before, Google searches say problem seems to be some trust level issue where your host may be using custom level, SMTP requires medium level trust. You told that you are using medium level, are you sure about it. Did you asked your hosting provider about this, what they told you.

DBounlom
Lieutenant (LT)
Lieutenant (LT)
Posts: 62
Joined: Wed Sep 09, 2009 1:26 pm

Re: Email Settings Error

Post by DBounlom » Mon Sep 28, 2009 1:39 pm

Dear Mazhar,

Thank you for writing back. The hosting company that we use fixed the problem for us, and this is how they explained the problem.

"The issue is related to the asp.net trust level being set to Medium Trust. System.Net.Mail requires Full Trust for ports
different than smtp port 25. This is the reason why System.Net.Mail generates security exceptions for 465, 587, 993.

We have set the port number to 25 and is working now. It seems that Google allows port 25 for connections trough smtp.gmail.com"

Even though on Google's SMTP setup configuration page, it does not list anything about port 25. However, we seem to be getting e-mail to work properly now. I hope this helps others if they have the same problem.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Email Settings Error

Post by mazhar » Tue Sep 29, 2009 2:17 am

Sounds great, thanks for resolving the thread. I appreciate it.

Post Reply