Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Send Test Email - Ignoring #2111


User avatar
0
hugol created

Hello,

When using the feature to send the "Test" Email in the Host (i.e. <a class="postlink" href="http://localhost:6240/Mpa/HostSettings">http://localhost:6240/Mpa/HostSettings</a>), I've noticed that the email is sent but the "Display Name" and "Send from email" are being ignored.

This code is stored at HostSettingsAppService.cs and the method is:

    public async Task SendTestEmail(SendTestEmailInput input)
    {
        await _emailSender.SendAsync(
            input.EmailAddress,
            L("TestEmail_Subject"),
            L("TestEmail_Body")
        );
    }

The variable "_emailSender" is defined in the ABP dlls (IEmailSender).

When the email arrives at my inbox the Display name and the "from" email is being ignored.

I don't know if the problem is related to the ABP framework or the fact that I'm using Outlook.com Alias. I think the latter is the problem but I'm not sure.

Anyone around that have experienced a similar situation or know how to sort this situation?

Any help would be most welcomed. Thanks.


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Those values should be retrieved from the settings you provide in host settings page. Did you set the values on host settings page ? You can check EmailSenderBase for more information. <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/f10fa5205c780bcc27adfe38aaae631f412eb7df/src/Abp/Net/Mail/EmailSenderBase.cs#L24">https://github.com/aspnetboilerplate/as ... ase.cs#L24</a>

  • User Avatar
    0
    hugol created

    Yes I did. This isn't related with the ABP, it's an outlook.com "feature".

    When you send an email from an outllok.com Alias it seems that it uses your Main Profile Name (even if you specify by code a Display Name), which in my humble opinion, defeats the purpose of having an alias.

    Anyway, this is sorted.

    Thank you very much once more for your help. 5* support. Keep up the good work.