Communication between Outlook and SQL Server - sql-server

I have a simple question:
I want to develop some kind of C# application that can store data (outgoing and incoming messages) in SQL Server.
The goal is :
Retrieve data from SQL Server through Outlook or another client interface
Send e-mails from Outlook to SQL Server
Is there any proposition?
Thanks lot

I found this solution here
Basing on this solution to create SMTP server, every message sent from outlook can be retrived by SMTP server and stored into database.
Now I am investigating how to do the same with pop3 server (create pop3 server linked with sql database)
Thanks

Related

SQL Server Database Mail with "Modern" authentication to connect to Microsoft 365 / Exchange

In Database Mail, I find this statement:
Database Mail is an enterprise solution for sending e-mail messages from the SQL Server Database Engine or Azure SQL Managed Instance. Your applications can send e-mail messages to users using Database Mail via an external SMTP server.
As I've been using Database Mail for over ten years, this is good to read.
However, apparently Database Mail uses the .NET SmtpClient class, which has not been kept up-to-date and even recommends "MailKit".
In Exchange Online / Deprecation of Basic Authentication, I find the following phrase:
SMTP AUTH will still be available when Basic authentication is permanently disabled on October 1, 2022.
So the obvious question is whether SQL Database Mail with SmtpClient uses "SMTP AUTH" and therefore can still connect to Exchange without an SMTP relay.
Or if a relay is needed, would the built-in Windows Server SMTP relay be able to "upgrade" the credential exchange when connecting off-site?
We have Database Mail configured using an outlook.com account, so there are definitely cases where Database Mail can send to a Microsoft-controlled email server using SMTP.
Bottom line, do we need to know anything other than that SMTP AUTH is still available?

Database Mail configuration in 2023 onward

I've been using Database Mail successfully for about ten years, but it seems that while mail protocols and security have moved forward, SQL Server Database Mail has not.
At a new company, I've spent a full work day already trying various credentials and parameters. The most recent release I have tested with is SQL Server 2019.
What I believe I need to know is how to configure SQL Server Database Mail to work with one of the following:
Office 365 or Exchange SMTP
Windows [Server] SMTP relay
In tests with GMAIL/SMTP, AT&T/SMTP and Earthlink/SMTP, all returned errors, and at least some of the error messages are clearly from the destination SMTP service and not the result of firewall or connectivity problems. For example:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 8 (2023-01-06T11:14:56). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.5.1 Authentication Required - ELNK003_308 - https://postmaster-earthlink.vadesecure.com/outbound_error_codes/#_308). )
Unfortunately, error 308 is not actually documented within the linked Earthlink page.
Looking into some available posts, I find that Database Mail is said to use the SmtpClient class, which in turn is pretty much obsolete, with recommendations to use MailKit. That's fine, but SQL Server Database Mail has apparently NOT been updated to use MailKit.
Returning to what I think are my choices are from above:
If I am to configure SMTP to Office 365 (we already have an account) or Exchange (if we have Exchange also), then what SMTP configuration parameters do I need to use with Database Mail and within Office 365?
=OR=
If I am to use Windows Server SMTP relay, then how do I configure the SMTP relay's OUTPUT mail to satisfy to the "modern" security requirements of Office 365, GMAIL, Earthlink or AT&T?
(I've used the Windows Server SMTP relay in years past, but only to offload the messages from SQL Server, not to satisfy security requirements)

How to connect Azure Sql with google looker data studio?

I am trying to connect Azure SQL Database to Google Looker Studio. I have tried using Microsoft SQL Server data source and I'm getting an error that I can't understand or search.
Sorry, we encountered an error and were unable to complete your
request.
Error ID: b723485e
The next option is to try and Enable SSL but it's asking for a certificate. I'm not sure where to get this certificate from?
I am also not sure if Microsoft SQL Server is the right connection as it says its for SQL Server 2018 and I know Azure SQL is different. I have successfully connected using the third party source called "SQL" but this is a paid service and my client doesn't want to use a third party. Any suggestions on how to connect?

SQLserver don't send notifications with service broker

I want to get my application notified if there is any change in my sql server db and I'm using Table dependency to get them. I'm working with a DB that I didn't created (it's sql server 2008R2) and it don't send the messages generated by the service broker, but in the same connection and with a different db generated by me and the same structure of table it sends the service broker messages to my application. Is there anything I need to change to allow SQLserver to send the messages?

SQL Server 2008 webservice, deprecated?

I am freelancing to a game server company and this game server uses a dedicated server with SQL Server 2008 on it, the game client connect to the game server on a random port (not a problem) and the SQL Server is closed down on the dedicated server, so it can't be accessed from a external source.
I am working on an idea to sell to my manager to create a web service, so I could make an online registration form and control panel to people to manage their goods online (without the game).
Well the question is: what's the best way to make a web service (the port 80 is open and with iis7/windows server 2008) to work on SQL Server 2008 Express, providing XML with some info to my Control Panel, and to make the online form to send a request to create new players on SQL Server too and answer with a XML confirming it?
I know I could do on PHP (since this IIS7 has php installed on it), but that would be a hell of work, and if there is no other way I will be doing it manually on php.
I would like to know if there is some way to work with something like NuSoap to work with SQL Server or any other way that is not the NATIVE SQL Server, (that I just read on microsoft website that is deprecated). And how to do it if possible
Thanks in advance
Create an OData service using WCF over an EF model of your game database. Read here: Creating an OData API for StackOverflow including XML and JSON in 30 minutes

Resources