Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7972477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:52:44+00:00 2026-06-04T07:52:44+00:00

I am setting up Database mail in SQL Server 2008 to send mail to

  • 0

I am setting up Database mail in SQL Server 2008 to send mail to my Gmail account. Following are the details of the DBMail profile I’ve created:

email id : xyz@gmail.com
Display Name : xyz
Reply email :
Server name : smtp.gmail.com
port no: 587
Check : This server requires a secure connection
Check : Basic Authentication
username : xyz@gmail.com ( should have gmail.com)
password : <mypassword>
confirm password : <mypassword>

Then I clicked next and also made it default public profile.

Then I use the following TSQL code to configure and send DBMail:

EXEC sp_CONFIGURE 'show advanced', 1
GO
RECONFIGURE
GO
EXEC sp_CONFIGURE 'Database Mail XPs', 1
GO
RECONFIGURE
GO

use msdb
go
EXEC sp_send_dbmail 
@profile_name='XYZ',
@recipients='XYZr@gmail.com',
@subject='Test message',
@body='Message Sent Successfully'

The output appears "Message Queued"

Still my message is getting failed. I feel I have setup the server correctly. Any input would be appreciated.

 SELECT * FROM sysmail_log

The body column shows

"The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2012-05-16T17:05:00). Exception Message: Could not connect to mail server. (No such host is known). )"

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:52:44+00:00Added an answer on June 4, 2026 at 7:52 am

    Some suggested troubleshooting steps:

    1. Try to send a message through the same SMTP server, using the same machine as SQL Server, using a client mail program like Outlook. You may get a more meaningful error message.

    2. The port may be blocked. Try sending mail to any other SMTP server using port 587.

    3. Try changing to port 465.

    4. Try unchecking the “requires a secure connection” bit in your profile.

    5. Try using an SMTP server inside your network to relay to GMail. This might be easier to set up and get running. You’ll need to install IIS and the SMTP components if you don’t have a local SMTP server available to handle the relay.

    6. Review http://mail.google.com/support/bin/answer.py?hl=en&answer=13287

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem setting up email notifications in SQL Server 2008. I am
Some guys where I work are setting up a new database server for SQL
I have a pretty standard database sitting on SQL Server. To manage the data
I've got the following T-SQL code below that's working from inside of SQL Server
I'm using HTML 5 Web SQL database in Safari. I'm setting the database size
What is the file, where database setting are stored in Joomla CMS? Like server,
I'm developing ASP.NET 4.0 Website using SQL server 2008 with Membership Framework. It runs
I have a small SQL Server database that I need to copy on command
I have the following SQL script: USE MyDatabase ALTER DATABASE MyDatabase SET SINGLE_USER WITH
I'm setting up a database using PHPMyAdmin and many fields will be large chunks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.