- ABP Framework version: v4.4.4
- UI type: /MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace:
An unhandled exception has occurred while executing the request.
System.Net.Mail.SmtpException: Failure sending mail.
---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. [::ffff:207.204.50.44]:25
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.DoMultipleAddressConnectCallback(Object result, MultipleAddressConnectAsyncResult context)
--- End of stack trace from previous location ---
at System.Net.Sockets.Socket.DoMultipleAddressConnectCallback(Object result, MultipleAddressConnectAsyncResult context)
at System.Net.Sockets.Socket.MultipleAddressConnectCallback(IAsyncResult result)
--- End of stack trace from previous location ---
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult)
at System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.InitializeConnectionCallback(IAsyncResult result)
--- End of stack trace from previous location ---
at System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult result)
at System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult result)
--- End of inner exception stack trace ---
at Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail)
at Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize)
at Volo.Abp.Emailing.EmailSenderBase.SendAsync(String to, String subject, String body, Boolean isBodyHtml)
at Volo.Abp.Account.Emailing.AccountEmailer.SendEmailConfirmationLinkAsync(IdentityUser user, String confirmationToken, String appName, String returnUrl, String returnUrlHash)
at Volo.Abp.Account.AccountAppService.SendEmailConfirmationTokenAsync(IdentityUser user, String applicationName, String returnUrl, String returnUrlHash)
at Volo.Abp.Account.AccountAppService.RegisterAsync(RegisterDto input)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.RegisterLocalUserAsync()
at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.OnPostAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.
- Steps to reproduce the issue:"on server register new user."
28 Answer(s)
-
0
hi
: Failure sending mail. ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (10013): An attempt was made to access a socket in a way forbidden
Please use this application to test your email config.
https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo
-
0
I am not able to send mail.
While Using MailKit error:->
MailKit.Security.SslHandshakeException: 'An error occurred while attempting to establish an SSL or TLS connection. The host name did not match the name given in the server's SSL certificate. AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.
While Using Smtp Error:-> Bad sequence of commands. The server response was: you must authenticate first (#5.5.1) This exception was originally thrown at this call stack: [External Code] EmailSendDemo.AbpEmailingServices.SmtpEmailSender.SendEmailAsync(System.Net.Mail.MailMessage) in SmtpEmailSender.cs [External Code] EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(System.Net.Mail.MailMessage, bool) in EmailSenderBase.cs [External Code] EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(string, string, string, string, bool) in EmailSenderBase.cs [External Code] EmailSendDemo.MailTestService.RunAsync() in Program.cs [External Code] EmailSendDemo.Program.Main(string[]) in Program.cs
-
0
hi
You can google the error message. I'm not familiar with this.
-
0
i am able to send email through this code :->https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo
but not able send mail from ABP Project on server using same credentials.
-
0
i am able to send email through this code :->https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo
Are you using MailKit? https://docs.abp.io/en/abp/latest/MailKit
-
0
No, we have used inbuilt module of abp for registeration. but i got error on server.
-
0
I am not able to send mail.
While Using MailKit error:->
MailKit.Security.SslHandshakeException: 'An error occurred while attempting to establish an SSL or TLS connection. The host name did not match the name given in the server's SSL certificate. AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.
While Using Smtp Error:-> Bad sequence of commands. The server response was: you must authenticate first (#5.5.1) This exception was originally thrown at this call stack: [External Code] EmailSendDemo.AbpEmailingServices.SmtpEmailSender.SendEmailAsync(System.Net.Mail.MailMessage) in SmtpEmailSender.cs [External Code] EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(System.Net.Mail.MailMessage, bool) in EmailSenderBase.cs [External Code] EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(string, string, string, string, bool) in EmailSenderBase.cs [External Code] EmailSendDemo.MailTestService.RunAsync() in Program.cs [External Code] EmailSendDemo.Program.Main(string[]) in Program.cs
Hi @kapil, can you set
SecureSocketOption
asSecureSocketOptions.SslOnConnect
:Configure<AbpMailKitOptions>(options => { options.SecureSocketOption = SecureSocketOptions.SslOnConnect; });
SslOnConnect -> The connection should use SSL or TLS encryption immediately. (http://www.mimekit.net/docs/html/T_MailKit_Security_SecureSocketOptions.htm)
- Also please check this helpful Stack Overflow answer to see the other possible solutions.
-
0
I am not able to send mail.
While Using MailKit error:->
MailKit.Security.SslHandshakeException: 'An error occurred while attempting to establish an SSL or TLS connection.
The host name did not match the name given in the server's SSL certificate.
AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.While Using Smtp Error:->
Bad sequence of commands. The server response was: you must authenticate first (#5.5.1)
This exception was originally thrown at this call stack:
[External Code]
EmailSendDemo.AbpEmailingServices.SmtpEmailSender.SendEmailAsync(System.Net.Mail.MailMessage) in SmtpEmailSender.cs
[External Code]
EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(System.Net.Mail.MailMessage, bool) in EmailSenderBase.cs
[External Code]
EmailSendDemo.AbpEmailingServices.EmailSenderBase.SendAsync(string, string, string, string, bool) in EmailSenderBase.cs
[External Code]
EmailSendDemo.MailTestService.RunAsync() in Program.cs
[External Code]
EmailSendDemo.Program.Main(string[]) in Program.csHi @kapil, can you set
SecureSocketOption
asSecureSocketOptions.SslOnConnect
:Configure<AbpMailKitOptions>(options => { options.SecureSocketOption = SecureSocketOptions.SslOnConnect; });
SslOnConnect -> The connection should use SSL or TLS encryption immediately. (http://www.mimekit.net/docs/html/T_MailKit_Security_SecureSocketOptions.htm)
- Also please check this helpful Stack Overflow answer to see the other possible solutions.
I Solve this error now i am able to send mail but using same credential(In Email Settingmanagement) on server its not working. it's through 500 error on register.(I am using inbuilt registration(Account Pro) modules of ABP)
-
0
it's through 500 error
What's the error detail?
-
0
it's through 500 error
What's the error detail?
System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. k9sm845219pgr.47 - gsmtp at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.MailCommand.EndSend(IAsyncResult result) at System.Net.Mail.SendMailAsyncResult.SendMailFromCompleted(IAsyncResult result) --- End of stack trace from previous location --- at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result) at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result) --- End of stack trace from previous location --- at Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(String to, String subject, String body, Boolean isBodyHtml) at Volo.Abp.Account.Emailing.AccountEmailer.SendEmailConfirmationLinkAsync(IdentityUser user, String confirmationToken, String appName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.SendEmailConfirmationTokenAsync(IdentityUser user, String applicationName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.RegisterAsync(RegisterDto input) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.RegisterLocalUserAsync() at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.OnPostAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker. -
0
i am able to send email through this code :->https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo
Can you share the email config with me? liming.ma@volosoft.com
-
0
-
0
-
0
-
0
it's through 500 error
What's the error detail?
System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. k9sm845219pgr.47 - gsmtp at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.MailCommand.EndSend(IAsyncResult result) at System.Net.Mail.SendMailAsyncResult.SendMailFromCompleted(IAsyncResult result) --- End of stack trace from previous location --- at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result) at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result) --- End of stack trace from previous location --- at Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(String to, String subject, String body, Boolean isBodyHtml) at Volo.Abp.Account.Emailing.AccountEmailer.SendEmailConfirmationLinkAsync(IdentityUser user, String confirmationToken, String appName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.SendEmailConfirmationTokenAsync(IdentityUser user, String applicationName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.RegisterAsync(RegisterDto input) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.RegisterLocalUserAsync() at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.OnPostAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.This error usually occurs if your credentials are not true, please check the email address and password that you've provided.
As I see you want to use the Gmail SMTP server. If you want to use Google's SMTP server settings and send emails via Gmail, you should confirm this first, if you haven't yet.
If you are sure about your email address-password and confirmed the related section in Gmail, can you try to set your password by using the
SettingManager
's SetGlobalAsync method :
public override void OnApplicationInitialization(ApplicationInitializationContext context) { var settingManager = context.ServiceProvider.GetService<SettingManager>(); //encrypts the password on set and decrypts on get(IStringEncryptionService) settingManager.SetGlobalAsync(EmailSettingNames.Smtp.Password, "your_password"); }
https://community.abp.io/articles/replacing-email-templates-and-sending-emails-jkeb8zzh#step---3
-
0
-
0
-
0
it's through 500 error
What's the error detail?
System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. k9sm845219pgr.47 - gsmtp
at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
at System.Net.Mail.MailCommand.EndSend(IAsyncResult result)
at System.Net.Mail.SendMailAsyncResult.SendMailFromCompleted(IAsyncResult result)
--- End of stack trace from previous location ---
at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result)
at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result)
--- End of stack trace from previous location ---
at Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail)
at Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize)
at Volo.Abp.Emailing.EmailSenderBase.SendAsync(String to, String subject, String body, Boolean isBodyHtml)
at Volo.Abp.Account.Emailing.AccountEmailer.SendEmailConfirmationLinkAsync(IdentityUser user, String confirmationToken, String appName, String returnUrl, String returnUrlHash)
at Volo.Abp.Account.AccountAppService.SendEmailConfirmationTokenAsync(IdentityUser user, String applicationName, String returnUrl, String returnUrlHash)
at Volo.Abp.Account.AccountAppService.RegisterAsync(RegisterDto input)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.RegisterLocalUserAsync()
at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.OnPostAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.This error usually occurs if your credentials are not true, please check the email address and password that you've provided.
As I see you want to use the Gmail SMTP server. If you want to use Google's SMTP server settings and send emails via Gmail, you should confirm this first, if you haven't yet.
If you are sure about your email address-password and confirmed the related section in Gmail, can you try to set your password by using the
SettingManager
's SetGlobalAsync method :
public override void OnApplicationInitialization(ApplicationInitializationContext context) { var settingManager = context.ServiceProvider.GetService<SettingManager>(); //encrypts the password on set and decrypts on get(IStringEncryptionService) settingManager.SetGlobalAsync(EmailSettingNames.Smtp.Password, "your_password"); }
https://community.abp.io/articles/replacing-email-templates-and-sending-emails-jkeb8zzh#step---3
I am not overriding any method,i am using abp inbuilt registration where i got this error on server.
-
0
hi
Can I check it remotely?
https://zoom.us/j/94516947934?pwd=bDhCRE9qeDkxcTZ2dWRoN2xxQ2Y3UT09
-
0
hi
Can I check it remotely?
https://zoom.us/j/94516947934?pwd=bDhCRE9qeDkxcTZ2dWRoN2xxQ2Y3UT09
yes sure,when?
-
0
You can join now, and share your screen.
-
0
i created new project and publish in IIS but same error is thrown
Error:-> System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. k9sm845219pgr.47 - gsmtp -
0
Can you test the
EmailSendDemo
console app on your server? -
0
Can you test the
EmailSendDemo
console app on your server?Yes it's work fine.
-
0
i created new project and publish in IIS but same error is thrown
Are you using a new database?