Base solution for your next web application
Open Closed

Setup smtp.office365.com #6259


User avatar
0
rnguyen created

Hi,

Could you please help me to setup smtp to send out an email by using smtp.office365.com. I google and read all the documents but not sure where can I set my

Smtp User name: [email protected] Smtp Password: xxxxx

for my smtp.office365.com port number 587 or 25 TLS/ StartTLS = Enabled

I don't know anything about MailKit

Please show me the way to set in appsettings.

Thank you


8 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Uncheck Use Default Credentials

  • User Avatar
    0
    rnguyen created

    Still doesn't work. Please see me previous picture

    where can I set my

    Smtp User name: [email protected] Smtp Password: xxxxx

    for my smtp.office365.com port number 587 or 25 TLS/ StartTLS = Enabled

  • User Avatar
    0
    ismcagdas created
    Support Team

    @rnguyen what is the error you are getting ? As @maliming pointed out, if you uncheck "Use Default Credentials", you will see the inputs for entering your credentials.

  • User Avatar
    0
    rnguyen created

    I still could not receive email from [email protected]

    Here is my Log

  • User Avatar
    0
    rnguyen created

    please help

  • User Avatar
    0
    pointlevel created

    Are you running your app locally in Debug-mode? If i remember right, the mail-function dont actually send mail in debug-mode, only in production, by design.

  • User Avatar
    0
    ryancyq created
    Support Team

    As @pointlevel mentioned, email sender is not implemented when running in debug mode.

    See https://github.com/aspnetzero/aspnet-zero-core/blob/01fc3f379a10c0dfaf9b9f4f1fcf1159d261f255/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Core/AbpZeroTemplateCoreModule.cs#L81-L85

  • User Avatar
    0
    mightyit created

    @rnguyen Clear the domain name field