{"id":1025,"date":"2011-10-01T03:02:38","date_gmt":"2011-10-01T03:02:38","guid":{"rendered":"http:\/\/craftydba.com\/?p=1025"},"modified":"2017-10-15T16:47:35","modified_gmt":"2017-10-15T16:47:35","slug":"database-mail","status":"publish","type":"post","link":"https:\/\/craftydba.com\/?p=1025","title":{"rendered":"Database Mail &#8211; Part 1"},"content":{"rendered":"<p><a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/ms175887.aspx\">Database Mail <\/a>is an enterprise solution for sending e-mail messages from the SQL Server Database Engine. It is very important to configure mail on any server that you manage. Error and performance alerting as well as SQL agent job outcomes depend upon this service for notifications.<\/p>\n<p>I am going to copy a <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/ms189635.aspx\">paragraph <\/a>directly from Microsoft TechNet since I can not say it in any better in my own words.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2011\/10\/database-mail.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-1059\" title=\"database-mail\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2011\/10\/database-mail.gif\" alt=\"\" width=\"267\" height=\"455\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2011\/10\/database-mail.gif 267w, https:\/\/craftydba.com\/wp-content\/uploads\/2011\/10\/database-mail-176x300.gif 176w\" sizes=\"auto, (max-width: 267px) 100vw, 267px\" \/><\/a><span style=\"color: #3366ff;\"><em>Database Mail is designed on a queued architecture that uses service broker technologies. When users execute sp_send_dbmail, the stored procedure inserts an item into the mail queue and creates a record that contains the e-mail message. Inserting the new entry in the mail queue starts the external Database Mail process (DatabaseMail.exe). The external process reads the e-mail information and sends the e-mail message to the appropriate e-mail server or servers. The external process inserts an item in the Status queue for the outcome of the send operation. Inserting the new entry in the status queue starts an internal stored procedure that updates the status of the e-mail message. Besides storing the sent, or unsent, e-mail message, Database Mail also records any e-mail attachments in the system tables. Database Mail views provide the status of messages for troubleshooting, and stored procedures allow for administration of the Database Mail queue.<br \/>\n<\/em><\/span><\/p>\n<p>I will be talking about the following topics today.<\/p>\n<ul>\n<li>Enabling the mail service<\/li>\n<li>Creating a mail account<\/li>\n<li>Making a mail profile<\/li>\n<li>Associating profiles with accounts<\/li>\n<li>Assign the profile a principle<\/li>\n<li>Sending that first email message<\/li>\n<li>Updating mail objects<\/li>\n<li>Deleting mail objects<\/li>\n<\/ul>\n<p>Each topic has a set of <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms177580.aspx\">system stored procedures<\/a> to add, update, delete and view mail system objects.<\/p>\n<p>As a surface area precaution, database mail is turned off upon installation. The following code enables the database mail service.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - enable database mail xps\">\r\n--\r\n-- Turn on database mail\r\n--\r\n\r\n-- Just shows standard options\r\nsp_configure\r\nGO\r\n\r\n-- Turn on advance options\r\nsp_configure 'show advanced options', 1;\r\nGO\r\n\r\n-- Reconfigure server\r\nRECONFIGURE;\r\nGO\r\n\r\n-- Turn on database xp's\r\nsp_configure 'Database Mail XPs', 1;\r\nGO\r\n\r\n-- Reconfigure server\r\nRECONFIGURE\r\nGO\r\n<\/pre>\n<\/p>\n<p>The database mail service is just like any other windows service that can be stopped, queried, and started. The snipet of code below shows how to perform those tasks.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - stop &#038; start service\">\r\n--\r\n-- Stopping and starting mail service\r\n--\r\n\r\n-- See if database mail (DM) is started\r\nEXEC msdb.dbo.sysmail_help_status_sp\r\nGO\r\n\r\n-- Stop the service\r\nEXEC msdb.dbo.sysmail_stop_sp\r\nGO\r\n\r\n-- See if database mail (DM) is stopped\r\nEXEC msdb.dbo.sysmail_help_status_sp\r\nGO\r\n\r\n-- Start the service\r\nEXEC msdb.dbo.sysmail_start_sp\r\nGO\r\n\r\n-- See if database mail (DM) is started\r\nEXEC msdb.dbo.sysmail_help_status_sp\r\nGO\r\n<\/pre>\n<\/p>\n<p>There are many options that can be confiured to change how database mail works.<\/p>\n<p><span style=\"color: #3366ff;\">AccountRetryAttempts <\/span>&#8211; The number of times that the external mail process attempts to send the e-mail message using each account in the specified profile.<\/p>\n<p><span style=\"color: #3366ff;\">AccountRetryDelay <\/span>&#8211; The amount of time, in seconds, for the external mail process to wait between attempts to send a message.<\/p>\n<p><span style=\"color: #3366ff;\">DatabaseMailExeMinimumLifeTime <\/span>&#8211; The minimum amount of time, in seconds, that the external mail process remains active.<\/p>\n<p><span style=\"color: #3366ff;\">DefaultAttachmentEncoding <\/span>&#8211; The default encoding for e-mail attachments.<\/p>\n<p><span style=\"color: #3366ff;\">MaxFileSize <\/span>&#8211; The maximum size of an attachment, in bytes.<\/p>\n<p><span style=\"color: #3366ff;\">ProhibitedExtensions <\/span>&#8211; A comma-separated list of extensions which cannot be sent as an attachment to an e-mail message.<\/p>\n<p><span style=\"color: #3366ff;\">LoggingLevel <\/span>&#8211; Specify which messages are recorded in the Database Mail log.<\/p>\n<p>In this example, I change the maximum file attachment size to 20K bytes and add the batch file extension as a prohibited file attachment.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - general mail configuration\">\r\n--\r\n-- General configuration options for mail\r\n--\r\n\r\n-- Set the max attachment size to 20000 bytes\r\nEXEC msdb.dbo.sysmail_configure_sp 'MaxFileSize', '20000';\r\n\r\n-- DM options - max file size\r\nEXEC msdb.dbo.sysmail_help_configure_sp 'MaxFileSize'\r\n\r\n-- Do not allow bat files as attachments\r\nEXEC msdb.dbo.sysmail_configure_sp 'ProhibitedExtensions', 'exe,dll,vbs,js,bat';\r\n\r\n-- DM options - prohibited extensions\r\nEXEC msdb.dbo.sysmail_help_configure_sp 'ProhibitedExtensions'\r\n<\/pre>\n<\/p>\n<p>If it is possible, setting up two mail accounts on different SMTP servers gives your mail profile fail over capability.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - create two database accounts\">\r\n--\r\n-- Creating two mail accounts with different SMTP servers\r\n--\r\n\r\n-- not supplying @username, @password - defaults to anonymous connection\r\n\r\n-- Create a Database Mail account 1\r\nEXEC msdb.dbo.sysmail_add_account_sp\r\n@account_name = 'Public Account 1',\r\n@description = 'Mail account for use by all database users.',\r\n@email_address = 'dbmail@craftydba.com',\r\n@replyto_address = 'donotreply@craftydba.com',\r\n@display_name = 'SQL SERVER (CRAFTY 1)',\r\n@mailserver_name = 'smtp.1and1.com' ;\r\nGO\r\n\r\n-- Create a Database Mail account 2\r\nEXEC msdb.dbo.sysmail_add_account_sp\r\n@account_name = 'Public Account 2',\r\n@description = 'Mail account for use by all database users.',\r\n@email_address = 'dbmail@craftydba.com',\r\n@replyto_address = 'donotreply@craftydba.com',\r\n@display_name = 'SQL SERVER (CRAFTY 2)',\r\n@mailserver_name = 'smtp.1and2.com' ;\r\nGO\r\n\r\n-- Show the new mail accounts\r\nEXEC msdb.dbo.sysmail_help_account_sp;\r\nGO\r\n<\/pre>\n<\/p>\n<p>I am going to associate one mail profile with the two above accounts.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - create one mail profile\">\r\n--\r\n-- Creating a mail profile\r\n--\r\n\r\n-- Create a Database Mail profile\r\nEXEC msdb.dbo.sysmail_add_profile_sp\r\n@profile_name = 'The Public Profile',\r\n@description = 'Profile used for administrative mail.' ;\r\nGO\r\n\r\n-- Show the new mail profile\r\nEXEC msdb.dbo.sysmail_help_profile_sp;\r\nGO\r\n<\/pre>\n<\/p>\n<p>Right now, the two accounts and one profile are seperate entities. The add profile account stored procedure associates one with the other.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - link profile to accounts\">\r\n--\r\n-- Linking the mail profile to the accounts\r\n--\r\n\r\n-- Add the account 1 to the profile\r\nEXEC msdb.dbo.sysmail_add_profileaccount_sp\r\n@profile_name = 'The Public Profile',\r\n@account_name = 'Public Account 1',\r\n@sequence_number = 1 ;\r\nGO\r\n\r\n-- Add the account 2 to the profile\r\nEXEC msdb.dbo.sysmail_add_profileaccount_sp\r\n@profile_name = 'The Public Profile',\r\n@account_name = 'Public Account 2',\r\n@sequence_number = 2 ;\r\nGO\r\n\r\n-- Show the link between profile and accounts\r\nEXEC msdb.dbo.sysmail_help_profileaccount_sp @profile_name = 'The Public Profile';\r\nGO\r\n<\/pre>\n<p>At this point, no one have been given rights to use this profile. The snipet below gives the public principle rights to the profile.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - give access to profile\">\r\n--\r\n-- Given public access to profile\r\n--\r\n\r\n-- Grant access to the profile to all users in the msdb database\r\nEXEC msdb.dbo.sysmail_add_principalprofile_sp\r\n@profile_name = 'The Public Profile',\r\n@principal_name = 'public',\r\n@is_default = 1 ;\r\n\r\n-- Show the new default profile\r\nEXEC msdb.dbo.sysmail_help_principalprofile_sp\r\n<\/pre>\n<p>The three examples of using sp_send_dmail are modified code from Tech Net tailored to this current talk.  The most simplest execution of the send dbmail stored procedure is to craft a simple text message as shown below.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - send simple email\">\r\n--\r\n-- Send message - example 1\r\n--\r\n\r\n-- Plain text message\r\nEXEC msdb.dbo.sp_send_dbmail\r\n@profile_name = 'The Public Profile',\r\n@recipients = 'john@craftydba.com',\r\n@body = 'The stored procedure finished successfully.',\r\n@subject = 'Automated Success Message' ;\r\nGO\r\n\r\n-- The mail queue\r\nEXEC msdb.dbo.sysmail_help_queue_sp\r\nGO\r\n<\/pre>\n<p>A real nice feature of send dbmail is that the results of a query can be embedded as an attachment.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - send email with query results attachment\">\r\n--\r\n-- Send message - example 2\r\n--\r\n\r\n-- Send with query results as an attachment\r\nEXEC msdb.dbo.sp_send_dbmail\r\n@profile_name = 'The Public Profile',\r\n@recipients = 'john@craftydba.com',\r\n@query = 'SELECT COUNT(*) FROM AdventureWorks2008R2.Production.WorkOrder\r\nWHERE DueDate > ''2006-04-30''\r\nAND DATEDIFF(dd, ''2006-04-30'', DueDate) < 2' ,\r\n@subject = 'Work Order Count',\r\n@attach_query_result_as_file = 1 ;\r\nGO\r\n<\/pre>\n<p>Last but not least, dbmail can send emails that are formatted as HTML. This allows the developer to use query output to generate nice HTML tables.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - send email with html body\">\r\n--\r\n-- Send message - example 3\r\n--\r\n\r\n-- Send with embedded html table containing query data\r\nDECLARE @VAR_HTML NVARCHAR(MAX) ;\r\nSET @VAR_HTML =\r\nN'<h1>Work Order Report<h1>' +\r\nN'<table border=\"1\">' +\r\nN'<tbody><tr><th>Work Order ID<\/th><th>Product ID<\/th>' +\r\nN'<th>Name<\/th><th>Order Qty<\/th><th>Due Date<\/th>' +\r\nN'<th>Expected Revenue<\/th><\/tr>' +\r\nCAST ( ( SELECT td = wo.WorkOrderID, '',\r\ntd = p.ProductID, '',\r\ntd = p.Name, '',\r\ntd = wo.OrderQty, '',\r\ntd = wo.DueDate, '',\r\ntd = (p.ListPrice - p.StandardCost) * wo.OrderQty\r\nFROM AdventureWorks2008R2.Production.WorkOrder as wo\r\nJOIN AdventureWorks2008R2.Production.Product AS p\r\nON wo.ProductID = p.ProductID\r\nWHERE DueDate > '2006-04-30'\r\nAND DATEDIFF(dd, '2006-04-30', DueDate) < 2\r\nORDER BY DueDate ASC,\r\n(p.ListPrice - p.StandardCost) * wo.OrderQty DESC\r\nFOR XML PATH('tr'), TYPE\r\n) AS NVARCHAR(MAX) ) +\r\nN'<\/tbody><\/table>' \r\n\r\nEXEC msdb.dbo.sp_send_dbmail\r\n@recipients='john@craftydba.com',\r\n@subject = 'Work Order List',\r\n@body = @VAR_HTML,\r\n@body_format = 'HTML' ;\r\n\r\n<\/pre>\n<p>There are many tables in msdb that are part of the database mail system. A list of them are below.<\/p>\n<p><span style=\"color: #3366ff;\"><\/p>\n<ul>\n<li>sysmail_account<\/li>\n<li>sysmail_attachments<\/li>\n<li>sysmail_attachments_transfer<\/li>\n<li>sysmail_configuration<\/li>\n<li>sysmail_log<\/li>\n<li>sysmail_mailitems<\/li>\n<li>sysmail_principalprofile<\/li>\n<li>sysmail_profile<\/li>\n<li>sysmail_profileaccount<\/li>\n<li>sysmail_query_transfer<\/li>\n<li>sysmail_send_retries<\/li>\n<li>sysmail_server<\/li>\n<li>sysmail_servertype<\/li>\n<\/ul>\n<p><\/span><br \/>\nThe log table contains an entry of each email try. A system stored procedure can be used to clean up the table if heavy usuage is performed.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - mail log table\">\r\n--\r\n-- View the log table & delete entries by date\r\n--\r\n\r\nSELECT * FROM msdb.dbo.sysmail_log ORDER BY log_date DESC\r\nGO\r\n\r\nEXEC msdb.dbo.sysmail_delete_log_sp @logged_before = '2011-09-29 17:08';\r\nGO\r\n<\/pre>\n<\/p>\n<p>A mail items table contains the actual message that is sent. A system stored procedure can be used to clean up the table if heavy usuage is performed.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - mail item table\">\r\n--\r\n-- View the mail items & delete by date\r\n--\r\n\r\nSELECT * FROM msdb.dbo.sysmail_mailitems ORDER BY send_request_date DESC\r\nGO\r\n\r\nEXEC msdb.dbo.sysmail_delete_mailitems_sp @sent_before = '2011-09-29 17:08';\r\n<\/pre>\n<p><\/P><\/p>\n<p>All of the tasks above have stored procedures that can be used to update accounts, profiles, assoications between profiles \/ accounts and assignments of principles to profiles.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - various update stored procedures\">\r\n--\r\n-- Updates\r\n--\r\n\r\n-- Change reply address to nothing\r\nEXEC msdb.dbo.sysmail_update_account_sp\r\n@account_name = 'Public Account 1',\r\n@replyto_address = '';\r\n\r\n-- Show the new mail accounts\r\nEXEC msdb.dbo.sysmail_help_account_sp;\r\nGO\r\n\r\n-- Change profile description\r\nEXEC msdb.dbo.sysmail_update_profile_sp\r\n@profile_name = 'The Public Profile',\r\n@description = 'Profile used for my application.' ;\r\nGO\r\n\r\n-- Show the new mail profile\r\nEXEC msdb.dbo.sysmail_help_profile_sp;\r\nGO\r\n\r\n-- Re-arrange the sequence\r\nEXEC msdb.dbo.sysmail_update_profileaccount_sp\r\n@profile_name = 'The Public Profile',\r\n@account_name = 'Public Account 1',\r\n@sequence_number = 3;\r\n\r\nEXEC msdb.dbo.sysmail_update_profileaccount_sp\r\n@profile_name = 'The Public Profile',\r\n@account_name = 'Public Account 2',\r\n@sequence_number = 1;\r\n\r\nEXEC msdb.dbo.sysmail_update_profileaccount_sp\r\n@profile_name = 'The Public Profile',\r\n@account_name = 'Public Account 1',\r\n@sequence_number = 2;\r\n\r\n-- Show the link between profile and accounts\r\nEXEC msdb.dbo.sysmail_help_profileaccount_sp @profile_name = 'The Public Profile';\r\nGO\r\n\r\n-- Make this not the default\r\nEXECUTE msdb.dbo.sysmail_update_principalprofile_sp\r\n@profile_name = 'The Public Profile',\r\n@principal_name = 'public',\r\n@is_default = 0 ;\r\n\r\n-- Show the new default profile\r\nEXEC msdb.dbo.sysmail_help_principalprofile_sp\r\n<\/pre>\n<\/p>\n<p>Anything that is created can be deleted in a instance. The delete stored procedures do just that with the mail objects.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - various delete stored procedures\">\r\n--\r\n-- Deletes\r\n--\r\n\r\n-- Remove principle\r\nEXEC msdb.dbo.sysmail_delete_principalprofile_sp\r\n@principal_name = 'public',\r\n@profile_name = 'The Public Profile' ;\r\n\r\n-- Show no default profile\r\nEXEC msdb.dbo.sysmail_help_principalprofile_sp\r\n\r\n-- Remove the links between profile and account\r\nEXEC msdb.dbo.sysmail_delete_profileaccount_sp\r\n@profile_name = 'The Public Profile',\r\n@account_name = 'Public Account 1';\r\n\r\nEXEC msdb.dbo.sysmail_delete_profileaccount_sp\r\n@profile_name = 'The Public Profile',\r\n@account_name = 'Public Account 2';\r\n\r\n-- Show no links between profile and accounts\r\nEXEC msdb.dbo.sysmail_help_profileaccount_sp @profile_name = 'The Public Profile';\r\nGO\r\n\r\n-- Remove the profile\r\nEXEC msdb.dbo.sysmail_delete_profile_sp\r\n@profile_name = 'The Public Profile';\r\n\r\n-- Show no mail profile\r\nEXEC msdb.dbo.sysmail_help_profile_sp;\r\nGO\r\n\r\n-- Remove the accounts\r\nEXECUTE msdb.dbo.sysmail_delete_account_sp\r\n@account_name = 'Public Account 1';\r\n\r\nEXECUTE msdb.dbo.sysmail_delete_account_sp\r\n@account_name = 'Public Account 2';\r\n\r\n-- Show the new mail accounts\r\nEXEC msdb.dbo.sysmail_help_account_sp;\r\nGO\r\n<\/pre>\n<\/p>\n<p>The key points to remember from this article is that accounts are associated with SMTP servers. Public or private Profiles are setup for application use. Profiles are associated to accounts and given rights of usage to principles. All objects can be added, updated and deleted from the system. Most important of all, the sp_send_dbmail can send simple text messages, messages with queary output attachments, and very complex HTML message bodies. Given all these options, alerts, reports and notifications of application and\/or system events can be created.<\/p>\n<p>I will continue next time by talking about setting up operators for system alerting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Database Mail is an enterprise solution for sending e-mail messages from the SQL Server Database Engine. It is very important to configure mail on any server that you manage. Error and performance alerting as well as SQL agent job outcomes depend upon this service for notifications. I am going to copy a paragraph directly from Microsoft TechNet since I can not say it in any better in my own words. Database Mail is designed on a queued architecture that uses service broker technologies. When users execute sp_send_dbmail, the stored procedure&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[117,119,158,15,120,145,122,124,128,126,146,147,148,130,132,134,136,138,142,140,144,121,123,127,125,129,131,149,150,151,152,153,154,155,156,157,133,135,137,139,143,141],"class_list":["post-1025","post","type-post","status-publish","format-standard","hentry","category-db-admin","tag-database-administrator","tag-database-mail","tag-dbmail","tag-john-f-miner-iii","tag-sp_send_dbmail","tag-sysmail_account","tag-sysmail_add_account_sp","tag-sysmail_add_principalprofile_sp","tag-sysmail_add_profileaccount_sp","tag-sysmail_add_profile_sp","tag-sysmail_attachments","tag-sysmail_attachments_transfer","tag-sysmail_configuration","tag-sysmail_configure_sp","tag-sysmail_delete_account_sp","tag-sysmail_delete_log_sp","tag-sysmail_delete_mailitems_sp","tag-sysmail_delete_principalprofile_sp","tag-sysmail_delete_profileaccount_sp","tag-sysmail_delete_profile_sp","tag-sysmail_help_account_sp","tag-sysmail_help_configure_sp","tag-sysmail_help_principalprofile_sp","tag-sysmail_help_profileaccount_sp","tag-sysmail_help_profile_sp","tag-sysmail_help_queue_sp","tag-sysmail_help_status_sp","tag-sysmail_log","tag-sysmail_mailitems","tag-sysmail_principalprofile","tag-sysmail_profile","tag-sysmail_profileaccount","tag-sysmail_query_transfer","tag-sysmail_send_retries","tag-sysmail_server","tag-sysmail_servertype","tag-sysmail_start_sp","tag-sysmail_stop_sp","tag-sysmail_update_account_sp","tag-sysmail_update_principalprofile_sp","tag-sysmail_update_profileaccount_sp","tag-sysmail_update_profile_sp"],"_links":{"self":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts\/1025","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1025"}],"version-history":[{"count":0,"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts\/1025\/revisions"}],"wp:attachment":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}