-1

I am a total newbie to SQL. I am a networking specialist so like most smaller IT positions I kind of got this problem dropped into my lap.

I have been able to pinpoint some issue through event logs and research but I am still stumped as to this message. I was just hoping that someone would be able to decipher the error message I am receiving so that I can find out how to fix it.

Thankfully I am learning a ton about how SQL works in the process, but for production I need to get this solved.

Any advice would be greatly... GREATLY... appreciated.

The message below is displayed when users of our companies portal submit attachments to tickets. I don't if that will help or not.

Error

Katherine Villyard
  • 18,550
  • 4
  • 37
  • 59
machinica
  • 19
  • 1
  • 2
    I don't see anything that looks like SQL there. First, start by figuring out what software you are using. Then find out what its support channels are. – Michael Hampton Feb 10 '16 at 21:46
  • 1
    It looks to me like a webpage is trying to execute a stored procedure in SQL that sends an email to a user after submitting a support ticket. This looks to me like it's probably a problem with the webpage and not necessarily SQL. – joeqwerty Feb 10 '16 at 21:49
  • Ok I will check those out. I didn't want to post that much for security reasons. Like I said I am a total newbie to SQL. This ticketing system reports to our SQL server so that's why I thought SQL. I really appreciate the quick responses! – machinica Feb 10 '16 at 21:55
  • 1
    If it is using database mail in MS SQL server, there is a log of all emails send out. Also, you may need to configure the database mail server in the SQL server management studio. – user228546 Feb 10 '16 at 22:25

1 Answers1

2

The web page is trying to execute the sp_send_dbmail stored procedure to mail the new ticket information to the user who created the ticket. Everything else is the content of the email.

There might be useful information in the sysmail_event_log or the logs.

Probably, the first debug step would be to make sure that the web page is properly executing sp_send_dbmail. The next step would be to verify that sp_send_dbmail actually works and that your web service has permission to execute it. You could probably copy everything between "Send mail:" and "There was a problem with the last request" into a SQL query window and see if it runs.

Katherine Villyard
  • 18,550
  • 4
  • 37
  • 59
  • Ok so I checked the logs and ran a few tests. I tried the sysmail.failed items and checked it against sysmail.sentitems. There is one difference, on the failed items the send_account_id is says NULL when on the completed items it says 1. Could this be the problem? – machinica Feb 10 '16 at 23:00
  • The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2016-02-10T15:25:15). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. vy6sm7540349pac.38 - gsmtp). ) – machinica Feb 10 '16 at 23:31
  • Your mail server now requires TLS, and sp_send_dbmail isn't using it. (Your mail administrator probably changed something.) You'll have to either edit the mail profile to use a secure connection or ask the person managing the mail server to make an exception for the SQL Server. There's a GUI for managing the mail profiles in SQL, so it shouldn't be too bad. This might help. http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/ – Katherine Villyard Feb 11 '16 at 00:14