HI,
I tried the Email Sending function you have and it is not working. The details I saved on the Settings/Emailing is not loading. I also tried the Send test email and its also not working.
Thanks, Mike If you're creating a bug/problem report, please include followings:
- ABP Framework version: v6.0
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes /
- Exception message and stack trace:
- Steps to reproduce the issue:"
18 Answer(s)
-
0
hi
What's the value of your
Host
setting? -
0
-
0
but the first issue is that the values I saved is not loading.
I don't get it. Can you explain more?
I also tried the Send test email and its also not working.
Please remove the
NullEmailSender
.#if DEBUG context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>()); #endif
-
0
but the first issue is that the values I saved is not loading.
I don't get it. Can you explain more?
I also tried the Send test email and its also not working.
Please remove the
NullEmailSender
.#if DEBUG context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>()); #endif
As you can see in this screenshot, SMTP Host is still null. Already removed the NullEmailSender. The test send email works now but if i use this code, the SMTP Host and other values are still null. Thanks, Mike
-
0
hi
Can you reproduce it in a new template project? liming.ma@volosoft.com
-
0
hi
Can you reproduce it in a new template project? liming.ma@volosoft.com
Create a new project from scratch? I havent tried that but this project of ours is still new, no development made on the backend, only on the frontend side.
I am thinking, the values are not initiating properly? Do I need to load/initiate it manually? Do note that send test email is working, I just created a test function to send an email but the values like SMTP host is not loading.
Thanks, Mike
-
0
What are full steps to reproduce in a new template?
-
0
What are full steps to reproduce in a new template?
Are you talking about the email template?
-
0
I am confused. Why are you asking me to create a new template? We used command lines to create the solution. something like abp new Acme.IssueManagement -t module-pro
-
0
Hi,
Could you share the full steps to reproduce it? as you know, we need to reproduce it first and then find a solution
-
0
I put the code in the backend of Blazor razor page then just created a button on the frontend to trigger the code.
using System; using System.Threading.Tasks; using Volo.Abp.Emailing; using Volo.Abp.Emailing.Templates; using Volo.Abp.TextTemplating;
namespace FireBird.Blazor.Pages;
public partial class Index { private readonly IEmailSender _emailSender; private readonly ITemplateRenderer _templateRenderer;
public Index( IEmailSender emailSender, ITemplateRenderer templateRenderer) { _emailSender = emailSender; _templateRenderer = templateRenderer; } public async Task email() { try { var body = await _templateRenderer.RenderAsync( StandardEmailTemplates.Message, new { message = "This is email body ABP test..." } ); await _emailSender.SendAsync("mikeo@theservicemanager.com", "mikeo@theservicemanager.com", "ABP Email subject test", "This is email body ABP test..." ); } catch (Exception ex) { var x = ex.Message; } }
}
-
0
-
0
-
0
Do I need to share also the password?
-
0
Yes please send it to liming.ma@volosoft.com I will test it.
-
0
Password sent. You did not respond.
-
0
Can I check your app by zoom remotely?
https://us05web.zoom.us/j/89210760707?pwd=NW1wVWovMlR0ZE1pVzR3dUZhMm52QT09
-
0
hi mikeolofernes
I have confirmed.
You can get email settings from blazor app, because the email settings are not visible to client.
You can only call an API from blazor, and the backend to send to email.