SQLServer Error: Could not connect to mail server. (The requested name is valid, but no data of the requested type was found) - sql

My Problem On Database Mail on Sql Server 2008 R2. My Database Mail Work fine upto yesterday since 2 years. But From Today My Database Mail Not Work.
I Restart my Database Server. Reconfigure the Database Mail but still i faced the following error.......
Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 6 (2017-06-12T16:12:12). Exception Message: Could not connect to mail server. (The requested name is valid, but no data of the requested type was found).
My Mail Account Setting in following...
I tried from Send Test E-mail, See the View Database Mail Log and see the above mention error.
Please help to resolve this issue.....
Thanks in advance....

Your problem seems network related, especially since nothing has changed on the database configuration.
Also make sure, your user has the rights to connect and access the specified mailbox.
Check Firewalls, DNS, IP configuration.
By the way, the configuration for Office365 seems good, that's the one I use for my servers ;)

Related

cPanel accounts unable to receive emails "host lookup for alpha.yodns.africa did not complete (DNS timeout?)"

I'm having an issue with incoming emails for my cPanel email accounts. Below is the error I get on all incoming emails when I check incoming emails on Mail Delivery Reports in WHM:
What I think caused the issue is that I was trying to transfer the cPanel accounts from one of my servers(alpha.yodns.top) to another server(alpha.yodns.africa). Now, I had some issues on the server that I was transferring to, so I decided to just keep the accounts running on the first server instead.
What I picked up while I was trying to fix this yesterday is that the nameservers had changed(to the NS of the server I was transferring to) on the DNS Zones of my accounts. So, I had to change those back to their original state. I thought that would resolve the issue but it didn't.
The accounts are able to send out but unable to receive any emails.
The issue has been resolved. I had to remove all the domains from /etc/manualmx using:
whmapi1 unset_manual_mx_redirects domain='example.com'
A manual_mx was somehow set to redirect to the new host server for all the domains.

A call to SSPI failed, see inner exception. DB Mail can't send email

My db mail suddenly stopped working, the error is:
The mail could not be sent to the recipients because of the mail
server failure. (Sending Mail using Account 2 (2018-08-14T16:00:23).
Exception Message: Cannot send mails to mail server. (A call to SSPI
failed, see inner exception.).
I can't find any more info on the error, it just suddenly stopped working.
My SQL Server is 2012.
All my smtp settings are correct and nothing changed.
If it worked at one point and you haven't changed anything with your firewall, then check your email password. Also if you are using gmail - you need to check if 'lesssecure' is turned on.
Open your Google Admin console (admin.google.com).
Click Security > Basic settings .
Under Less secure apps, select Go to settings for less secure apps .
In the subwindow, select the Enforce access to less secure apps for all users radio button. ...
Click the Save button.

SQL Server database Mail Unusual behaviour

Hi i have configured two profile account with different gmail account associated respectively.
attached is a screenshot comparison.
Profile SRV SQL Alert is working, but the other one is not working, they both have the same settings in SSL and smtp and port.
anything i missed here?
Imgage screenshot is here: https://ibb.co/j7q4oR
The screenshot of the "not working" setup on the right lists the server as SMPT.gmail.com
This does not resolve to an IP address. Swap the P and the T around to make it smtp.gmail.com

Unable to connect to Linked Server (Excel file) when using SQL account

The Plan
Have HR personnel dump an Excel file of payroll Job Titles to a network share, add that file as a Linked Server in SSMS, use those titles in my ASP.Net web forms. Using a Linked Server instead of importing data to allow HR to update the Job Titles file at their discretion.
The Problem
I can create the Linked Server and query it without issue, so long as I'm in SSMS with Windows Authentication. But, if I try to access the linked server using a SQL account, I first get the error:
Access to the remote server is denied because no login-mapping exists (Error 7416)
The SQL account being used is the same account my web forms use for everything else. The fact that this SQL account doesn't have file permissions isn't surprising though, so an adjustment to the Linked Server's security should do the trick.
The Problem (part 2)
To reduce the number of variables, I moved the Excel file so it's on the same machine as my SQL Server. I'm logged into the machine and logged into SSMS with my domain admin account.
I access the Linked Server's security tab and, to try and cast the widest net possible, I leave the local login (top part) blank and head straight to "Be made with this security context:" and proceed to provide my domain admin credentials. I hit OK, and I get the following:
Not a valid account name or password (Error 7399)
I know the account name and password are good, so what gives?
Other Things
Folks who've ran into similar things have been instructed to change the logon account being used for the SQL Server service, which I've done using my domain admin account (for troubleshooting, atm). This did not fix the problem.
This is what the Linked Server code looks like, although I created it via the GUI (included for sake of completeness):
EXEC master.dbo.sp_addlinkedserver #server = N'ADP_TITLES', #srvproduct=N'', #provider=N'Microsoft.ACE.OLEDB.12.0', #datasrc=N'C:\JOB_TITLE_EXPORT.xlsx', #provstr=N'Excel 12.0 Xml'
EXEC master.dbo.sp_addlinkedsrvlogin #rmtsrvname=N'ADP_TITLES',#useself=N'False',#locallogin=NULL,#rmtuser=N'DOMAIN\username',#rmtpassword='########'
The solution appears to be entering "admin" for the remote login, and leave the password blank.
This only works, however, if the file is stored locally. If it's on the network, I still get a 7399 error, but instead of saying the issue is the account name/password, it now says the issue is unspecified.
I can make my project work with a local file though. Since I'll be moving forward with that, I have no need to solicit additional answers.

vb.net Send Smtp Mail From IIS FormatException

Well i got a page that sends emails and everything runs fine in the developer web server but when i publish to a IIS Server i get a FormatException when i try to send the mail....
ex.Message = "the specified string is not in the form required for an e-mail address."
the email is in this sample someone#gmail.com
Im using the "SmtpClient" and the "MailMessage" classes to send mails..
And the server runs windows server 2003
Edit:
Im using same smtp settings on the Dev Webserver as im doing in IIS.
Check that you've enabled local email relaying for the SMTP service on your Windows Server 2003 box. By 'local' I mean that applications on your local machine can use the SMTP service to relay emails - but you almost certainly don't want to allow external connections to do the same.
Make sure you don't have any invisible whitespace around your email address. For example, if you are getting the email from a database, or input control, try trimming it, like:
mail.To.Add( New MailAddress( txtEmailAddress.Text.Trim() ) )
If any one gets this problem the solution is don't use the empty constructor of MailMessage!!!!!