Comments (7)
Hi @samirnext!
Can you help me out? Would you be able to provide some example code or even create a throw-away repo or a GitHub Gist with a sample app containing the pertinent code that isn't working? Don't include anything sensitive like credentials for your SMTP account. The gist is, do you have a reproduction case for me that I can use and go off of?
Also, would you be able to tell me what SMTP provider you are trying to authenticate against? (e.g. Google, Amazon SES, etc.)
from postal.
I'm just going to leave a little more information here for you to see if you covered your bases.
At my work all of the SmtpClient configuration is done in the web.config/app.config files. We don't actually hard-code anything in the code. If you have the correct authentication and SmtpClient configuration settings in your web.config/app.config file, then Postal should just work out of the box, especially with let's say Gmail and Sasl.
References:
- https://stackoverflow.com/questions/757987/send-email-via-c-sharp-through-google-apps-account
- https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/network/network-element-network-settings
So in the "network" element, you need to make sure:
- defaultCredentials = false
- enableSsl = true
- Set the host, username, and password properties.
If you haven't tried those things go ahead and play around with that and let me know if that fixes your issue or not. If I don't hear back from you by the end of February I'll consider the issue closed.
from postal.
Hi,
when i use dotnet smtp (without postal ) it work by adding this lines :
ServicePointManager.ServerCertificateValidationCallback = (object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) => true;
SmtpConexiune.DeliveryMethod = SmtpDeliveryMethod.Network;
mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
SecurityProtocolType oldSecurityProtocol = ServicePointManager.SecurityProtocol;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
SmtpConexiune.Send(mail);
ServicePointManager.SecurityProtocol = oldSecurityProtocol;
how i can enable the tls security protocole in tha app.config ?
thanks
from postal.
hi,
i resolve this issue but adding this line before Send() methode
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
thanks
from postal.
Hi there! It sounds like you need to configure SASL authentication for sending email in your C# MVC laser application using Postal. You might want to check your SMTP settings and credentials. Ensure they match your email provider's requirements. If you still face issues, consider providing more details for specific help. Good luck.
from postal.
Sure, I'd be happy to help with enabling SASL authentication. Could you please provide more specific details about the system or platform you are referring to? This will allow me to provide you with accurate instructions movers.
from postal.
Enabling SASL authentication is a crucial step for enhancing security in various systems and applications. If you have any specific questions or need guidance on how to enable SASL authentication in a particular context Investement Visa, please provide more details, and I'd be happy to assist further.
from postal.
Related Issues (20)
- Add support on other html attributes except alt in @Html.EmbedImage() HOT 2
- How to add external link with params? HOT 2
- Is this project still being supported? HOT 3
- How to identify if the email is sent or not HOT 3
- Html Helpers not working from console application HOT 4
- Postal MVC5 project references MVC 5.1.0.0 instead of 5.1.2 as the requirements state HOT 5
- Postal w/o MVC NuGet package?
- How to provide smtp settings runtime(not in web or app config)
- With Framework 4.6.2 it give error Attempted to access an element as a type incompatible with the array HOT 5
- Previewing emails with addresses with names HOT 3
- Install-Package : Input string was not in a correct format. HOT 5
- Continuation of Postal HOT 26
- System.ArgumentNullException with .NET 4.5.2 WebApi HOT 9
- Sample For Postal.AspnetCore? HOT 3
- The parameter 'addresses' cannot be an empty string. HOT 1
- Layouts Stopped Working
- MVC4 throws exception when using autofac and MVC async controller actions HOT 3
- How to use Postal with Unity IoC Container MVC 5?
- Subject encoding HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postal.