Comments (2)
I found a solution how to send email via M365 SMT Relay from scratch in C#, but I still haven't found how to properly set abp emailing configuration.
Here is a sample c# application:
using System;
using System.Net.Mail;
class Program
{
static void Main()
{
string senderEmail = "[email protected]";
string senderDisplayName = "Sender Name";
MailAddress mailAddressSender = new MailAddress(senderEmail, senderDisplayName);
string recipientEmail = "[email protected]";
MailAddress recipientAddress = new MailAddress(recipientEmail);
MailMessage message = new MailMessage(mailAddressSender, recipientAddress);
message.From = mailAddressSender;
message.Subject = "Hello from .NET Console App";
message.Body = "This is the email body.";
string host = "<name>.mail.protection.outlook.com";
int port = 25;
SmtpClient smtpClient = new SmtpClient(host, port);
smtpClient.EnableSsl = true;
try
{
Console.WriteLine("Try Email send.");
smtpClient.Send(message);
Console.WriteLine("Email sent successfully.");
}
catch (Exception ex)
{
Console.WriteLine("Failed to send email. Error message: " + ex.Message);
}
}
}
@maliming do you maybe have suggestions for this question?
Thank you
from abp.
hi
Add your EmailSender
and override the BuildMailMessage
and BuildClientAsync
method
If you need additional parameters, please use: #17582
from abp.
Related Issues (20)
- Can not redirect successfully from auth server to angular app if uri include params HOT 2
- openIddict applications page: Javascript Datatables error HOT 1
- SettingManager will do nothing if we call `SetAsync` with an undefined provider
- Settings will be cleared unexpectedly if multiple providers with the same name HOT 2
- App service name should not be IntegrationAppService because it clashes with Integration Services HOT 1
- Cannot launch the published application HOT 1
- DomainTenantResolver sample for NG-TIERED with OpenIddict HOT 1
- Custom public index page for CMS kit occurs error when upgrade to 8.0.2 HOT 1
- Problem with the ABP setup HOT 1
- Datatable pagination works incorrect
- Autthentication Server Information is Missing in Getting Started (Tutorials - Blazor WASM & Server)
- A custom AuthorizationHandler or a custom PermissionValueProvider is executed twice when the service is set to a virtual method HOT 8
- Extend feature management to the User level HOT 1
- The SSL connection could not be established, see inner exception HOT 1
- Migration notes for `NormalizedName` property of `Tenant`.
- Volo.Abp.AzureServiceBus send messages to queue
- Dependency injection in custom ABP app fail HOT 4
- AddAbpSwaggerGenWithOidc tenant replacement issue
- Volo.Abp.AbpException: Could not find file '/libs/abp/core/abp.css' when trying to load ABP Login Page from Angular UI HOT 8
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 abp.